From 077a8b72a97010f29e4b9be52651675cd05f60e5 Mon Sep 17 00:00:00 2001 From: "SND\\edgbla_cp" Date: Tue, 20 Nov 2012 21:15:32 +0000 Subject: . git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@81327 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- gui/Gtk2Gui.c | 1034 ------------------------------------------- gui/GtkGui.c | 1034 +++++++++++++++++++++++++++++++++++++++++++ gui/Makefile.am | 2 +- plugins/dfinput/Makefile.am | 2 +- plugins/dfinput/cfg-gtk.c | 785 ++++++++++++++++++++++++++++++++ plugins/dfinput/cfg-gtk2.c | 785 -------------------------------- po/POTFILES.in | 4 +- po/fr_FR.po | 128 +++--- po/hu_HU.po | 128 +++--- po/it.po | 128 +++--- po/pcsxr.pot | 128 +++--- po/pt_BR.po | 128 +++--- po/ru_RU.po | 128 +++--- po/zh_CN.po | 172 +++---- po/zh_TW.po | 128 +++--- 15 files changed, 2357 insertions(+), 2357 deletions(-) delete mode 100755 gui/Gtk2Gui.c create mode 100644 gui/GtkGui.c create mode 100644 plugins/dfinput/cfg-gtk.c delete mode 100755 plugins/dfinput/cfg-gtk2.c diff --git a/gui/Gtk2Gui.c b/gui/Gtk2Gui.c deleted file mode 100755 index 15913b68..00000000 --- a/gui/Gtk2Gui.c +++ /dev/null @@ -1,1034 +0,0 @@ -/* Pcsx - Pc Psx Emulator - * Copyright (C) 1999-2002 Pcsx Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "Linux.h" - -#include "../libpcsxcore/plugins.h" -#include "../libpcsxcore/cheat.h" - -#include "MemcardDlg.h" -#include "ConfDlg.h" -#include "DebugMemory.h" -#include "AboutDlg.h" - -// Functions Callbacks -void OnFile_RunCd(); -void OnFile_RunBios(); -void OnFile_RunExe(); -void OnFile_RunImage(); -void OnEmu_Run(); -void OnEmu_Reset(); -void OnEmu_Shutdown(); -void OnEmu_SwitchImage(); -void OnHelp_Help(); -void OnHelp_About(); -void OnDestroy(); -void OnFile_Exit(); - -void on_states_load(GtkWidget *widget, gpointer user_data); -void on_states_load_other(); -void on_states_save(GtkWidget *widget, gpointer user_data); -void on_states_save_other(); - -static GtkBuilder *builder; -GtkWidget *Window = NULL; - -int destroy = 0; - -#define MAX_SLOTS 9 - -/* TODO - If MAX_SLOTS changes, need to find a way to automatically set all positions */ -int Slots[MAX_SLOTS] = { -1, -1, -1, -1, -1, -1, -1, -1, -1 }; - -void ResetMenuSlots() { - GtkWidget *widget; - gchar *str; - int i; - - if (CdromId[0] == '\0') { - // disable state saving/loading if no CD is loaded - for (i = 0; i < MAX_SLOTS; i++) { - str = g_strdup_printf("GtkMenuItem_SaveSlot%d", i+1); - widget = gtk_builder_get_object(builder, str); - g_free(str); - - gtk_widget_set_sensitive(widget, FALSE); - - str = g_strdup_printf("GtkMenuItem_LoadSlot%d", i+1); - widget = gtk_builder_get_object(builder, str); - g_free(str); - - gtk_widget_set_sensitive(widget, FALSE); - } - - // also disable certain menu/toolbar items - widget = gtk_builder_get_object(builder, "other1"); - gtk_widget_set_sensitive(widget, FALSE); - widget = gtk_builder_get_object(builder, "other2"); - gtk_widget_set_sensitive(widget, FALSE); - widget = gtk_builder_get_object(builder, "run1"); - gtk_widget_set_sensitive(widget, FALSE); - widget = gtk_builder_get_object(builder, "reset1"); - gtk_widget_set_sensitive(widget, FALSE); - widget = gtk_builder_get_object(builder, "shutdown1"); - gtk_widget_set_sensitive(widget, FALSE); - widget = gtk_builder_get_object(builder, "search1"); - gtk_widget_set_sensitive(widget, FALSE); - widget = gtk_builder_get_object(builder, "SwitchImage"); - gtk_widget_set_sensitive(widget, FALSE); - widget = gtk_builder_get_object(builder, "memorydump1"); - gtk_widget_set_sensitive(widget, FALSE); - widget = gtk_builder_get_object(builder, "toolbutton_run"); - gtk_widget_set_sensitive(widget, FALSE); - widget = gtk_builder_get_object(builder, "toolbutton_switchimage"); - gtk_widget_set_sensitive(widget, FALSE); - widget = gtk_builder_get_object(builder, "plugins_bios"); - gtk_widget_set_sensitive(widget, TRUE); - widget = gtk_builder_get_object(builder, "graphics1"); - gtk_widget_set_sensitive(widget, TRUE); - widget = gtk_builder_get_object(builder, "sound1"); - gtk_widget_set_sensitive(widget, TRUE); - widget = gtk_builder_get_object(builder, "cdrom1"); - gtk_widget_set_sensitive(widget, TRUE); - widget = gtk_builder_get_object(builder, "pad1"); - gtk_widget_set_sensitive(widget, TRUE); - widget = gtk_builder_get_object(builder, "net1"); - gtk_widget_set_sensitive(widget, TRUE); - - widget = gtk_builder_get_object(builder, "toolbutton_switchimage"); - gtk_widget_set_sensitive(widget, UsingIso()); - widget = gtk_builder_get_object(builder, "toolbutton_graphics"); - gtk_widget_set_sensitive(widget, TRUE); - widget = gtk_builder_get_object(builder, "toolbutton_sound"); - gtk_widget_set_sensitive(widget, TRUE); - widget = gtk_builder_get_object(builder, "toolbutton_cdrom"); - gtk_widget_set_sensitive(widget, TRUE); - widget = gtk_builder_get_object(builder, "toolbutton_controllers"); - gtk_widget_set_sensitive(widget, TRUE); - - widget = gtk_builder_get_object(builder, "statusbar"); - gtk_statusbar_pop(GTK_STATUSBAR(widget), 1); - gtk_statusbar_push(GTK_STATUSBAR(widget), 1, _("Ready")); - } - else { - for (i = 0; i < MAX_SLOTS; i++) { - str = g_strdup_printf("GtkMenuItem_LoadSlot%d", i+1); - widget = gtk_builder_get_object (builder, str); - g_free (str); - - if (Slots[i] == -1) - gtk_widget_set_sensitive(widget, FALSE); - else - gtk_widget_set_sensitive(widget, TRUE); - } - - widget = gtk_builder_get_object(builder, "plugins_bios"); - gtk_widget_set_sensitive(widget, FALSE); - widget = gtk_builder_get_object(builder, "graphics1"); - gtk_widget_set_sensitive(widget, FALSE); - widget = gtk_builder_get_object(builder, "sound1"); - gtk_widget_set_sensitive(widget, FALSE); - widget = gtk_builder_get_object(builder, "cdrom1"); - gtk_widget_set_sensitive(widget, FALSE); - widget = gtk_builder_get_object(builder, "pad1"); - gtk_widget_set_sensitive(widget, FALSE); - widget = gtk_builder_get_object(builder, "net1"); - gtk_widget_set_sensitive(widget, FALSE); - widget = gtk_builder_get_object(builder, "SwitchImage"); - gtk_widget_set_sensitive(widget, UsingIso()); - widget = gtk_builder_get_object(builder, "toolbutton_switchimage"); - gtk_widget_set_sensitive(widget, UsingIso()); - widget = gtk_builder_get_object(builder, "toolbutton_graphics"); - gtk_widget_set_sensitive(widget, FALSE); - widget = gtk_builder_get_object(builder, "toolbutton_sound"); - gtk_widget_set_sensitive(widget, FALSE); - widget = gtk_builder_get_object(builder, "toolbutton_cdrom"); - gtk_widget_set_sensitive(widget, FALSE); - widget = gtk_builder_get_object(builder, "toolbutton_controllers"); - gtk_widget_set_sensitive(widget, FALSE); - - widget = gtk_builder_get_object(builder, "statusbar"); - gtk_statusbar_pop(GTK_STATUSBAR(widget), 1); - gtk_statusbar_push(GTK_STATUSBAR(widget), 1, _("Emulation Paused.")); - } -} - -int match(const char *string, char *pattern) { - int status; - regex_t re; - - if (regcomp(&re, pattern, REG_EXTENDED | REG_NOSUB) != 0) { - return 0; - } - status = regexec(&re, string, (size_t) 0, NULL, 0); - regfree(&re); - if (status != 0) { - return 0; - } - - return 1; -} - -gchar* get_state_filename(int i) { - gchar *state_filename; - char SStateFile[64]; - char trimlabel[33]; - int j; - - strncpy(trimlabel, CdromLabel, 32); - trimlabel[32] = 0; - for (j = 31; j >= 0; j--) - if (trimlabel[j] == ' ') - trimlabel[j] = 0; - else - continue; - - sprintf(SStateFile, "%.32s-%.9s.%3.3d", trimlabel, CdromId, i); - state_filename = g_build_filename (getenv("HOME"), STATES_DIR, SStateFile, NULL); - - return state_filename; -} - -void UpdateMenuSlots() { - gchar *str; - int i; - - for (i = 0; i < MAX_SLOTS; i++) { - str = get_state_filename (i); - Slots[i] = CheckState(str); - g_free (str); - } -} - -void StartGui() { - GtkWidget *widget; - - /* If a plugin fails, the Window is not NULL, but is not initialised, - so the following causes a segfault - if (Window != NULL) { - gtk_window_present (GTK_WINDOW (Window)); - return; - }*/ - builder = gtk_builder_new(); - - if (!gtk_builder_add_from_file(builder, PACKAGE_DATA_DIR "pcsxr.ui", NULL)) { - g_warning("Error: interface could not be loaded!"); - return; - } - - Window = gtk_builder_get_object(builder, "MainWindow"); - gtk_widget_show(GTK_WIDGET(Window)); - - gtk_window_set_title(GTK_WINDOW(Window), "PCSXR"); - gtk_window_set_icon_from_file(GTK_WINDOW(Window), PIXMAPDIR "pcsxr-icon.png", NULL); - gtk_window_set_default_icon_from_file(PIXMAPDIR "pcsxr-icon.png", NULL); - ResetMenuSlots(); - - // Set up callbacks - g_signal_connect_data(G_OBJECT(Window), "delete-event", - G_CALLBACK(OnDestroy), builder, (GClosureNotify)g_object_unref, G_CONNECT_AFTER); - - // File menu - widget = gtk_builder_get_object(builder, "RunCd"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(OnFile_RunCd), NULL, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(builder, "RunBios"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(OnFile_RunBios), NULL, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(builder, "RunExe"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(OnFile_RunExe), NULL, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(builder, "RunImage"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(OnFile_RunImage), NULL, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(builder, "exit2"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(OnFile_Exit), NULL, NULL, G_CONNECT_AFTER); - - // States - widget = gtk_builder_get_object(builder, "GtkMenuItem_LoadSlot1"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_load), (gpointer) 0, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "GtkMenuItem_LoadSlot2"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_load), (gpointer) 1, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "GtkMenuItem_LoadSlot3"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_load), (gpointer) 2, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "GtkMenuItem_LoadSlot4"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_load), (gpointer) 3, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "GtkMenuItem_LoadSlot5"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_load), (gpointer) 4, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "GtkMenuItem_LoadSlot6"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_load), (gpointer) 5, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "GtkMenuItem_LoadSlot7"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_load), (gpointer) 6, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "GtkMenuItem_LoadSlot8"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_load), (gpointer) 7, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "GtkMenuItem_LoadSlot9"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_load), (gpointer) 8, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "other1"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_load_other), NULL, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(builder, "GtkMenuItem_SaveSlot1"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_save), (gpointer) 0, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "GtkMenuItem_SaveSlot2"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_save), (gpointer) 1, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "GtkMenuItem_SaveSlot3"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_save), (gpointer) 2, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "GtkMenuItem_SaveSlot4"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_save), (gpointer) 3, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "GtkMenuItem_SaveSlot5"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_save), (gpointer) 4, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "GtkMenuItem_SaveSlot6"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_save), (gpointer) 5, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "GtkMenuItem_SaveSlot7"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_save), (gpointer) 6, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "GtkMenuItem_SaveSlot8"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_save), (gpointer) 7, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "GtkMenuItem_SaveSlot9"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_save), (gpointer) 8, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "other2"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(on_states_save_other), NULL, NULL, G_CONNECT_AFTER); - - // Emulation menu - widget = gtk_builder_get_object(builder, "run1"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(OnEmu_Run), NULL, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "reset1"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(OnEmu_Reset), NULL, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "shutdown1"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(OnEmu_Shutdown), NULL, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "SwitchImage"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(OnEmu_SwitchImage), NULL, NULL, G_CONNECT_AFTER); - - // Configuration menu - widget = gtk_builder_get_object(builder, "plugins_bios"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(ConfigurePlugins), NULL, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "graphics1"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(OnConf_Graphics), NULL, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "sound1"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(OnConf_Sound), NULL, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "cdrom1"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(OnConf_CdRom), NULL, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "pad1"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(OnConf_Pad), NULL, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "cpu1"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(OnConf_Cpu), NULL, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "memory_cards1"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(OnConf_Mcds), NULL, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "net1"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(OnConf_Net), NULL, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "memorydump1"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(RunDebugMemoryDialog), NULL, NULL, G_CONNECT_AFTER); - - // Cheat menu - widget = gtk_builder_get_object(builder, "browse1"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(RunCheatListDialog), NULL, NULL, G_CONNECT_AFTER); - widget = gtk_builder_get_object(builder, "search1"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(RunCheatSearchDialog), NULL, NULL, G_CONNECT_AFTER); - - // Help menu - widget = gtk_builder_get_object(builder, "about_pcsxr1"); - g_signal_connect_data(G_OBJECT(widget), "activate", - G_CALLBACK(OnHelp_About), NULL, NULL, G_CONNECT_AFTER); - - // Toolbar - widget = gtk_builder_get_object(builder, "toolbutton_runcd"); - g_signal_connect_data(G_OBJECT(widget), "clicked", - G_CALLBACK(OnFile_RunCd), NULL, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(builder, "toolbutton_runimage"); - g_signal_connect_data(G_OBJECT(widget), "clicked", - G_CALLBACK(OnFile_RunImage), NULL, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(builder, "toolbutton_run"); - g_signal_connect_data(G_OBJECT(widget), "clicked", - G_CALLBACK(OnEmu_Run), NULL, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(builder, "toolbutton_switchimage"); - g_signal_connect_data(G_OBJECT(widget), "clicked", - G_CALLBACK(OnEmu_SwitchImage), NULL, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(builder, "toolbutton_memcards"); - g_signal_connect_data(G_OBJECT(widget), "clicked", - G_CALLBACK(OnConf_Mcds), NULL, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(builder, "toolbutton_graphics"); - g_signal_connect_data(G_OBJECT(widget), "clicked", - G_CALLBACK(OnConf_Graphics), NULL, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(builder, "toolbutton_sound"); - g_signal_connect_data(G_OBJECT(widget), "clicked", - G_CALLBACK(OnConf_Sound), NULL, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(builder, "toolbutton_cdrom"); - g_signal_connect_data(G_OBJECT(widget), "clicked", - G_CALLBACK(OnConf_CdRom), NULL, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(builder, "toolbutton_controllers"); - g_signal_connect_data(G_OBJECT(widget), "clicked", - G_CALLBACK(OnConf_Pad), NULL, NULL, G_CONNECT_AFTER); - - gtk_main(); -} - -void OnDestroy() { - if (!destroy) OnFile_Exit(); -} - -void destroy_main_window () { - destroy = 1; - gtk_widget_destroy(Window); - Window = NULL; - destroy = 0; - gtk_main_quit(); - while (gtk_events_pending()) gtk_main_iteration(); -} - -void OnFile_RunExe() { - GtkWidget *file_chooser; - - if (plugins_configured() == FALSE) { - ConfigurePlugins(); - } else { - file_chooser = gtk_file_chooser_dialog_new(_("Select PSX EXE File"), - NULL, GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); - - // Add file filters - GtkFileFilter *exefilter = gtk_file_filter_new (); - gtk_file_filter_add_pattern (exefilter, "*.exe"); - gtk_file_filter_add_pattern (exefilter, "*.psx"); - gtk_file_filter_add_pattern (exefilter, "*.cpe"); - gtk_file_filter_add_pattern (exefilter, "*.EXE"); - gtk_file_filter_add_pattern (exefilter, "*.PSX"); - gtk_file_filter_add_pattern (exefilter, "*.CPE"); - gtk_file_filter_set_name (exefilter, _("PlayStation Executable Files")); - gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (file_chooser), exefilter); - GtkFileFilter *allfilter = gtk_file_filter_new (); - gtk_file_filter_add_pattern (allfilter, "*"); - gtk_file_filter_set_name (allfilter, _("All Files")); - gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (file_chooser), allfilter); - - // Set this to the config object and retain it - maybe LastUsedDir - gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(file_chooser), getenv("HOME")); - - if (gtk_dialog_run(GTK_DIALOG(file_chooser)) == GTK_RESPONSE_ACCEPT) { - gchar *file; - - /* TODO Need to validate the file */ - - file = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(file_chooser)); - - gtk_widget_destroy (file_chooser); - destroy_main_window(); - - SetIsoFile(NULL); - LoadPlugins(); - NetOpened = FALSE; - - if (OpenPlugins() == -1) { - g_free(file); - SysRunGui(); - } else { - // Auto-detect: get region first, then rcnt-bios reset - SysReset(); - - if (Load(file) == 0) { - g_free(file); - psxCpu->Execute(); - } else { - g_free(file); - ClosePlugins(); - SysErrorMessage(_("Not a valid PSX file"), _("The file does not appear to be a valid Playstation executable")); - SysRunGui(); - } - } - } else - gtk_widget_destroy(file_chooser); - } -} - -void OnFile_RunCd() { - if (plugins_configured() == FALSE) { - ConfigurePlugins(); - return; - } - - destroy_main_window(); - - SetIsoFile(NULL); - LoadPlugins(); - NetOpened = FALSE; - - if (OpenPlugins() == -1) { - SysRunGui(); - return; - } - - if (CheckCdrom() == -1) { - /* Only check the CD if we are starting the console with a CD */ - ClosePlugins(); - SysErrorMessage (_("CD ROM failed"), _("The CD does not appear to be a valid Playstation CD")); - SysRunGui(); - return; - } - - // Auto-detect: get region first, then rcnt-bios reset - SysReset(); - - // Read main executable directly from CDRom and start it - if (LoadCdrom() == -1) { - ClosePlugins(); - SysErrorMessage(_("Could not load CD-ROM!"), _("The CD-ROM could not be loaded")); - SysRunGui(); - } - - psxCpu->Execute(); -} - -void OnFile_RunBios() { - if (plugins_configured() == FALSE) { - ConfigurePlugins(); - return; - } - - if (strcmp(Config.Bios, "HLE") == 0) { - SysErrorMessage (_("Could not run BIOS"), _("Running BIOS is not supported with Internal HLE BIOS.")); - return; - } - - destroy_main_window(); - - SetIsoFile(NULL); - LoadPlugins(); - NetOpened = FALSE; - - if (OpenPlugins() == -1) { - SysRunGui(); - return; - } - - SysReset(); - - CdromId[0] = '\0'; - CdromLabel[0] = '\0'; - - psxCpu->Execute(); -} - -static gchar *Open_Iso_Proc() { - GtkWidget *chooser; - gchar *filename; - GtkFileFilter *psxfilter, *allfilter; - static char current_folder[MAXPATHLEN] = ""; - - chooser = gtk_file_chooser_dialog_new (_("Open PSX Disc Image File"), - NULL, GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_OK, - NULL); - - if (current_folder[0] == '\0') { - strcpy(current_folder, getenv("HOME")); - } - - gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (chooser), current_folder); - - psxfilter = gtk_file_filter_new(); - gtk_file_filter_add_pattern(psxfilter, "*.bin"); - gtk_file_filter_add_pattern(psxfilter, "*.img"); - gtk_file_filter_add_pattern(psxfilter, "*.mdf"); - gtk_file_filter_add_pattern(psxfilter, "*.iso"); - gtk_file_filter_add_pattern(psxfilter, "*.BIN"); - gtk_file_filter_add_pattern(psxfilter, "*.IMG"); - gtk_file_filter_add_pattern(psxfilter, "*.MDF"); - gtk_file_filter_add_pattern(psxfilter, "*.ISO"); - gtk_file_filter_set_name(psxfilter, _("PSX Image Files (*.bin, *.img, *.mdf, *.iso)")); - gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (chooser), psxfilter); - - allfilter = gtk_file_filter_new(); - gtk_file_filter_add_pattern(allfilter, "*"); - gtk_file_filter_set_name(allfilter, _("All Files")); - gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (chooser), allfilter); - - if (gtk_dialog_run(GTK_DIALOG(chooser)) == GTK_RESPONSE_OK) { - gchar *path = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(chooser)); - - /* Workaround: - for some reasons gtk_file_chooser_get_current_folder return NULL - if a file is selected from "Recently Used" or "Searsh"*/ - if(path != NULL) { - strcpy(current_folder, path); - g_free(path); - } - - GSList * l = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER (chooser)); - if(l) { - filename = l->data; - - /* if the file was selected from "Recently Used" or "Searsh" - we need to extract the path from the filename to set it to current_folder*/ - if(path == NULL) { - strncpy(current_folder, filename, strrchr(filename, '/') - filename); - } - - /* free useless data */ - GSList * ll = l; - while(l->next) { - l = l->next; - g_free(l->data); - } - g_slist_free(ll); - - gtk_widget_destroy(GTK_WIDGET(chooser)); - while (gtk_events_pending()) gtk_main_iteration(); - return filename; - } else { - gtk_widget_destroy (GTK_WIDGET(chooser)); - while (gtk_events_pending()) gtk_main_iteration(); - return NULL; - } - } else { - gtk_widget_destroy (GTK_WIDGET(chooser)); - while (gtk_events_pending()) gtk_main_iteration(); - return NULL; - } -} - -void OnFile_RunImage() { - gchar *filename; - - if (plugins_configured() == FALSE) { - ConfigurePlugins(); - return; - } - - filename = Open_Iso_Proc(); - if (filename == NULL) { - return; - } - - destroy_main_window(); - - SetIsoFile(filename); - g_free(filename); - - LoadPlugins(); - NetOpened = FALSE; - - if (OpenPlugins() == -1) { - SysRunGui(); - return; - } - - if (CheckCdrom() == -1) { - // Only check the CD if we are starting the console with a CD - ClosePlugins(); - SysErrorMessage (_("CD ROM failed"), _("The CD does not appear to be a valid Playstation CD")); - SysRunGui(); - return; - } - - // Auto-detect: get region first, then rcnt-bios reset - SysReset(); - - // Read main executable directly from CDRom and start it - if (LoadCdrom() == -1) { - ClosePlugins(); - SysErrorMessage(_("Could not load CD-ROM!"), _("The CD-ROM could not be loaded")); - SysRunGui(); - } - - psxCpu->Execute(); -} - -void OnEmu_Run() { - if (plugins_configured() == FALSE) { - ConfigurePlugins(); - return; - } - - destroy_main_window(); - - if (OpenPlugins() == -1) { - SysRunGui(); - return; - } - - CheatSearchBackupMemory(); - psxCpu->Execute(); -} - -void OnEmu_Reset() { - if (plugins_configured() == FALSE) { - ConfigurePlugins(); - return; - } - - destroy_main_window(); - - if (OpenPlugins() == -1) { - SysRunGui(); - return; - } - - if (CheckCdrom() != -1) { - LoadCdrom(); - } - - // Auto-detect: get region first, then rcnt-bios reset - SysReset(); - - psxCpu->Execute(); -} - -void OnEmu_Shutdown() { - ReleasePlugins(); - SetIsoFile(NULL); - CdromId[0] = '\0'; - CdromLabel[0] = '\0'; - ResetMenuSlots(); -} - -void OnEmu_SwitchImage() { - gchar *filename; - - if (plugins_configured() == FALSE) { - ConfigurePlugins(); - return; - } - - filename = Open_Iso_Proc(); - if (filename == NULL) { - return; - } - - destroy_main_window(); - - SetIsoFile(filename); - g_free(filename); - - if (OpenPlugins() == -1) { - SysRunGui(); - return; - } - - SetCdOpenCaseTime(time(NULL) + 2); - - CheatSearchBackupMemory(); - psxCpu->Execute(); -} - -void OnFile_Exit() { - DIR *dir; - struct dirent *ent; - void *Handle; - gchar *plugin = NULL; - gchar *dotdir; - - dotdir = g_build_filename(getenv("HOME"), PLUGINS_DIR, NULL); - - // with this the problem with plugins that are linked with the pthread - // library is solved - - dir = opendir(dotdir); - if (dir != NULL) { - while ((ent = readdir(dir)) != NULL) { - plugin = g_build_filename(dotdir, ent->d_name, NULL); - - if (strstr(plugin, ".so") == NULL && strstr(plugin, ".dylib") == NULL) - continue; - Handle = dlopen(plugin, RTLD_NOW); - if (Handle == NULL) - continue; - - g_free(plugin); - } - } - g_free(dotdir); - - bind_textdomain_codeset(PACKAGE_NAME, ""); - if (UseGui) - gtk_main_quit(); - SysClose(); - exit(0); -} - -void state_load(gchar *state_filename) { - int ret; - char Text[MAXPATHLEN + 20]; - FILE *fp; - - // check if the state file actually exists - fp = fopen(state_filename, "rb"); - if (fp == NULL) { - // file does not exist - return; - } - - fclose(fp); - - // If the window exists, then we are loading the state from within - // within the PCSXR GUI. We need to initialise the plugins first - if (Window) { - destroy_main_window(); - - if (OpenPlugins() == -1) { - SysRunGui(); - return; - } - } - - ret = CheckState(state_filename); - - if (ret == 0) { - // Check the CD-ROM is valid - if (CheckCdrom() == -1) { - ClosePlugins(); - SysRunGui(); - return; - } - - // Auto-detect: region first, then rcnt reset - SysReset(); - ret = LoadState(state_filename); - - sprintf(Text, _("Loaded state %s."), state_filename); - GPU_displayText(Text); - } else { - sprintf(Text, _("Error loading state %s!"), state_filename); - GPU_displayText(Text); - } -} - -void state_save(gchar *state_filename) { - char Text[MAXPATHLEN + 20]; - - GPU_updateLace(); - - if (SaveState(state_filename) == 0) - sprintf(Text, _("Saved state %s."), state_filename); - else - sprintf(Text, _("Error saving state %s!"), state_filename); - - GPU_displayText(Text); -} - -void on_states_load (GtkWidget *widget, gpointer user_data) { - gchar *state_filename; - gint state = (int)user_data; - - state_filename = get_state_filename(state); - - state_load(state_filename); - - g_free(state_filename); - - psxCpu->Execute(); -} - -void on_states_save (GtkWidget *widget, gpointer user_data) { - gchar *state_filename; - gint state = (int)user_data; - - state_filename = get_state_filename(state); - - state_save(state_filename); - - g_free(state_filename); -} - -void on_states_load_other() { - GtkWidget *file_chooser; - gchar *SStateFile; - - SStateFile = g_strconcat(getenv("HOME"), STATES_DIR, NULL); - - file_chooser = gtk_file_chooser_dialog_new(_("Select State File"), NULL, GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, - NULL); - gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (file_chooser), SStateFile); - g_free(SStateFile); - - if (gtk_dialog_run(GTK_DIALOG(file_chooser)) == GTK_RESPONSE_ACCEPT) { - gchar *filename; - - filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(file_chooser)); - gtk_widget_destroy(file_chooser); - - state_load(filename); - - g_free(filename); - - psxCpu->Execute(); - } else - gtk_widget_destroy(file_chooser); -} - -void on_states_save_other() { - GtkWidget *file_chooser; - gchar *SStateFile; - - SStateFile = g_strconcat (getenv("HOME"), STATES_DIR, NULL); - - file_chooser = gtk_file_chooser_dialog_new(_("Select State File"), - NULL, GTK_FILE_CHOOSER_ACTION_SAVE, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_SAVE, GTK_RESPONSE_OK, - NULL); - gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(file_chooser), SStateFile); - g_free(SStateFile); - - if (gtk_dialog_run (GTK_DIALOG(file_chooser)) == GTK_RESPONSE_OK) { - gchar *filename; - - filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (file_chooser)); - gtk_widget_destroy(file_chooser); - - state_save(filename); - - g_free(filename); - } - else - gtk_widget_destroy(file_chooser); -} - -void OnHelp_About(GtkWidget *widget, gpointer user_data) { - RunAboutDialog(); -} - -void SysMessage(const char *fmt, ...) { - GtkWidget *Txt, *MsgDlg; - va_list list; - char msg[512]; - - va_start(list, fmt); - vsprintf(msg, fmt, list); - va_end(list); - - if (msg[strlen(msg) - 1] == '\n') - msg[strlen(msg) - 1] = 0; - - if (!UseGui) { - fprintf(stderr, "%s\n", msg); - return; - } - - MsgDlg = gtk_dialog_new_with_buttons(_("Notice"), NULL, - GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_NONE, NULL); - - gtk_window_set_position (GTK_WINDOW(MsgDlg), GTK_WIN_POS_CENTER); - - Txt = gtk_label_new (msg); - gtk_label_set_line_wrap(GTK_LABEL(Txt), TRUE); - gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area(GTK_DIALOG(MsgDlg))), Txt); - - gtk_widget_show (Txt); - gtk_widget_show_all (MsgDlg); - gtk_dialog_run (GTK_DIALOG(MsgDlg)); - gtk_widget_destroy (MsgDlg); -} - -void SysErrorMessage(gchar *primary, gchar *secondary) { - GtkWidget *message_dialog; - if (!UseGui) - printf ("%s - %s\n", primary, secondary); - else { - message_dialog = gtk_message_dialog_new(NULL, - GTK_DIALOG_MODAL, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_CLOSE, - primary, - NULL); - gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(message_dialog), - secondary); - - gtk_dialog_run(GTK_DIALOG(message_dialog)); - gtk_widget_destroy(message_dialog); - } -} - -void SysInfoMessage(gchar *primary, gchar *secondary) { - GtkWidget *message_dialog; - if (!UseGui) - printf ("%s - %s\n", primary, secondary); - else { - message_dialog = gtk_message_dialog_new(NULL, - GTK_DIALOG_MODAL, - GTK_MESSAGE_INFO, - GTK_BUTTONS_CLOSE, - primary, - NULL); - gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(message_dialog), - secondary); - - gtk_dialog_run(GTK_DIALOG(message_dialog)); - gtk_widget_destroy(message_dialog); - } -} diff --git a/gui/GtkGui.c b/gui/GtkGui.c new file mode 100644 index 00000000..15913b68 --- /dev/null +++ b/gui/GtkGui.c @@ -0,0 +1,1034 @@ +/* Pcsx - Pc Psx Emulator + * Copyright (C) 1999-2002 Pcsx Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "Linux.h" + +#include "../libpcsxcore/plugins.h" +#include "../libpcsxcore/cheat.h" + +#include "MemcardDlg.h" +#include "ConfDlg.h" +#include "DebugMemory.h" +#include "AboutDlg.h" + +// Functions Callbacks +void OnFile_RunCd(); +void OnFile_RunBios(); +void OnFile_RunExe(); +void OnFile_RunImage(); +void OnEmu_Run(); +void OnEmu_Reset(); +void OnEmu_Shutdown(); +void OnEmu_SwitchImage(); +void OnHelp_Help(); +void OnHelp_About(); +void OnDestroy(); +void OnFile_Exit(); + +void on_states_load(GtkWidget *widget, gpointer user_data); +void on_states_load_other(); +void on_states_save(GtkWidget *widget, gpointer user_data); +void on_states_save_other(); + +static GtkBuilder *builder; +GtkWidget *Window = NULL; + +int destroy = 0; + +#define MAX_SLOTS 9 + +/* TODO - If MAX_SLOTS changes, need to find a way to automatically set all positions */ +int Slots[MAX_SLOTS] = { -1, -1, -1, -1, -1, -1, -1, -1, -1 }; + +void ResetMenuSlots() { + GtkWidget *widget; + gchar *str; + int i; + + if (CdromId[0] == '\0') { + // disable state saving/loading if no CD is loaded + for (i = 0; i < MAX_SLOTS; i++) { + str = g_strdup_printf("GtkMenuItem_SaveSlot%d", i+1); + widget = gtk_builder_get_object(builder, str); + g_free(str); + + gtk_widget_set_sensitive(widget, FALSE); + + str = g_strdup_printf("GtkMenuItem_LoadSlot%d", i+1); + widget = gtk_builder_get_object(builder, str); + g_free(str); + + gtk_widget_set_sensitive(widget, FALSE); + } + + // also disable certain menu/toolbar items + widget = gtk_builder_get_object(builder, "other1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = gtk_builder_get_object(builder, "other2"); + gtk_widget_set_sensitive(widget, FALSE); + widget = gtk_builder_get_object(builder, "run1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = gtk_builder_get_object(builder, "reset1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = gtk_builder_get_object(builder, "shutdown1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = gtk_builder_get_object(builder, "search1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = gtk_builder_get_object(builder, "SwitchImage"); + gtk_widget_set_sensitive(widget, FALSE); + widget = gtk_builder_get_object(builder, "memorydump1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = gtk_builder_get_object(builder, "toolbutton_run"); + gtk_widget_set_sensitive(widget, FALSE); + widget = gtk_builder_get_object(builder, "toolbutton_switchimage"); + gtk_widget_set_sensitive(widget, FALSE); + widget = gtk_builder_get_object(builder, "plugins_bios"); + gtk_widget_set_sensitive(widget, TRUE); + widget = gtk_builder_get_object(builder, "graphics1"); + gtk_widget_set_sensitive(widget, TRUE); + widget = gtk_builder_get_object(builder, "sound1"); + gtk_widget_set_sensitive(widget, TRUE); + widget = gtk_builder_get_object(builder, "cdrom1"); + gtk_widget_set_sensitive(widget, TRUE); + widget = gtk_builder_get_object(builder, "pad1"); + gtk_widget_set_sensitive(widget, TRUE); + widget = gtk_builder_get_object(builder, "net1"); + gtk_widget_set_sensitive(widget, TRUE); + + widget = gtk_builder_get_object(builder, "toolbutton_switchimage"); + gtk_widget_set_sensitive(widget, UsingIso()); + widget = gtk_builder_get_object(builder, "toolbutton_graphics"); + gtk_widget_set_sensitive(widget, TRUE); + widget = gtk_builder_get_object(builder, "toolbutton_sound"); + gtk_widget_set_sensitive(widget, TRUE); + widget = gtk_builder_get_object(builder, "toolbutton_cdrom"); + gtk_widget_set_sensitive(widget, TRUE); + widget = gtk_builder_get_object(builder, "toolbutton_controllers"); + gtk_widget_set_sensitive(widget, TRUE); + + widget = gtk_builder_get_object(builder, "statusbar"); + gtk_statusbar_pop(GTK_STATUSBAR(widget), 1); + gtk_statusbar_push(GTK_STATUSBAR(widget), 1, _("Ready")); + } + else { + for (i = 0; i < MAX_SLOTS; i++) { + str = g_strdup_printf("GtkMenuItem_LoadSlot%d", i+1); + widget = gtk_builder_get_object (builder, str); + g_free (str); + + if (Slots[i] == -1) + gtk_widget_set_sensitive(widget, FALSE); + else + gtk_widget_set_sensitive(widget, TRUE); + } + + widget = gtk_builder_get_object(builder, "plugins_bios"); + gtk_widget_set_sensitive(widget, FALSE); + widget = gtk_builder_get_object(builder, "graphics1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = gtk_builder_get_object(builder, "sound1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = gtk_builder_get_object(builder, "cdrom1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = gtk_builder_get_object(builder, "pad1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = gtk_builder_get_object(builder, "net1"); + gtk_widget_set_sensitive(widget, FALSE); + widget = gtk_builder_get_object(builder, "SwitchImage"); + gtk_widget_set_sensitive(widget, UsingIso()); + widget = gtk_builder_get_object(builder, "toolbutton_switchimage"); + gtk_widget_set_sensitive(widget, UsingIso()); + widget = gtk_builder_get_object(builder, "toolbutton_graphics"); + gtk_widget_set_sensitive(widget, FALSE); + widget = gtk_builder_get_object(builder, "toolbutton_sound"); + gtk_widget_set_sensitive(widget, FALSE); + widget = gtk_builder_get_object(builder, "toolbutton_cdrom"); + gtk_widget_set_sensitive(widget, FALSE); + widget = gtk_builder_get_object(builder, "toolbutton_controllers"); + gtk_widget_set_sensitive(widget, FALSE); + + widget = gtk_builder_get_object(builder, "statusbar"); + gtk_statusbar_pop(GTK_STATUSBAR(widget), 1); + gtk_statusbar_push(GTK_STATUSBAR(widget), 1, _("Emulation Paused.")); + } +} + +int match(const char *string, char *pattern) { + int status; + regex_t re; + + if (regcomp(&re, pattern, REG_EXTENDED | REG_NOSUB) != 0) { + return 0; + } + status = regexec(&re, string, (size_t) 0, NULL, 0); + regfree(&re); + if (status != 0) { + return 0; + } + + return 1; +} + +gchar* get_state_filename(int i) { + gchar *state_filename; + char SStateFile[64]; + char trimlabel[33]; + int j; + + strncpy(trimlabel, CdromLabel, 32); + trimlabel[32] = 0; + for (j = 31; j >= 0; j--) + if (trimlabel[j] == ' ') + trimlabel[j] = 0; + else + continue; + + sprintf(SStateFile, "%.32s-%.9s.%3.3d", trimlabel, CdromId, i); + state_filename = g_build_filename (getenv("HOME"), STATES_DIR, SStateFile, NULL); + + return state_filename; +} + +void UpdateMenuSlots() { + gchar *str; + int i; + + for (i = 0; i < MAX_SLOTS; i++) { + str = get_state_filename (i); + Slots[i] = CheckState(str); + g_free (str); + } +} + +void StartGui() { + GtkWidget *widget; + + /* If a plugin fails, the Window is not NULL, but is not initialised, + so the following causes a segfault + if (Window != NULL) { + gtk_window_present (GTK_WINDOW (Window)); + return; + }*/ + builder = gtk_builder_new(); + + if (!gtk_builder_add_from_file(builder, PACKAGE_DATA_DIR "pcsxr.ui", NULL)) { + g_warning("Error: interface could not be loaded!"); + return; + } + + Window = gtk_builder_get_object(builder, "MainWindow"); + gtk_widget_show(GTK_WIDGET(Window)); + + gtk_window_set_title(GTK_WINDOW(Window), "PCSXR"); + gtk_window_set_icon_from_file(GTK_WINDOW(Window), PIXMAPDIR "pcsxr-icon.png", NULL); + gtk_window_set_default_icon_from_file(PIXMAPDIR "pcsxr-icon.png", NULL); + ResetMenuSlots(); + + // Set up callbacks + g_signal_connect_data(G_OBJECT(Window), "delete-event", + G_CALLBACK(OnDestroy), builder, (GClosureNotify)g_object_unref, G_CONNECT_AFTER); + + // File menu + widget = gtk_builder_get_object(builder, "RunCd"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(OnFile_RunCd), NULL, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(builder, "RunBios"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(OnFile_RunBios), NULL, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(builder, "RunExe"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(OnFile_RunExe), NULL, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(builder, "RunImage"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(OnFile_RunImage), NULL, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(builder, "exit2"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(OnFile_Exit), NULL, NULL, G_CONNECT_AFTER); + + // States + widget = gtk_builder_get_object(builder, "GtkMenuItem_LoadSlot1"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_load), (gpointer) 0, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "GtkMenuItem_LoadSlot2"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_load), (gpointer) 1, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "GtkMenuItem_LoadSlot3"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_load), (gpointer) 2, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "GtkMenuItem_LoadSlot4"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_load), (gpointer) 3, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "GtkMenuItem_LoadSlot5"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_load), (gpointer) 4, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "GtkMenuItem_LoadSlot6"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_load), (gpointer) 5, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "GtkMenuItem_LoadSlot7"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_load), (gpointer) 6, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "GtkMenuItem_LoadSlot8"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_load), (gpointer) 7, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "GtkMenuItem_LoadSlot9"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_load), (gpointer) 8, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "other1"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_load_other), NULL, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(builder, "GtkMenuItem_SaveSlot1"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_save), (gpointer) 0, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "GtkMenuItem_SaveSlot2"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_save), (gpointer) 1, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "GtkMenuItem_SaveSlot3"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_save), (gpointer) 2, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "GtkMenuItem_SaveSlot4"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_save), (gpointer) 3, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "GtkMenuItem_SaveSlot5"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_save), (gpointer) 4, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "GtkMenuItem_SaveSlot6"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_save), (gpointer) 5, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "GtkMenuItem_SaveSlot7"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_save), (gpointer) 6, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "GtkMenuItem_SaveSlot8"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_save), (gpointer) 7, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "GtkMenuItem_SaveSlot9"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_save), (gpointer) 8, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "other2"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(on_states_save_other), NULL, NULL, G_CONNECT_AFTER); + + // Emulation menu + widget = gtk_builder_get_object(builder, "run1"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(OnEmu_Run), NULL, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "reset1"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(OnEmu_Reset), NULL, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "shutdown1"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(OnEmu_Shutdown), NULL, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "SwitchImage"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(OnEmu_SwitchImage), NULL, NULL, G_CONNECT_AFTER); + + // Configuration menu + widget = gtk_builder_get_object(builder, "plugins_bios"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(ConfigurePlugins), NULL, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "graphics1"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(OnConf_Graphics), NULL, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "sound1"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(OnConf_Sound), NULL, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "cdrom1"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(OnConf_CdRom), NULL, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "pad1"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(OnConf_Pad), NULL, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "cpu1"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(OnConf_Cpu), NULL, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "memory_cards1"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(OnConf_Mcds), NULL, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "net1"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(OnConf_Net), NULL, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "memorydump1"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(RunDebugMemoryDialog), NULL, NULL, G_CONNECT_AFTER); + + // Cheat menu + widget = gtk_builder_get_object(builder, "browse1"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(RunCheatListDialog), NULL, NULL, G_CONNECT_AFTER); + widget = gtk_builder_get_object(builder, "search1"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(RunCheatSearchDialog), NULL, NULL, G_CONNECT_AFTER); + + // Help menu + widget = gtk_builder_get_object(builder, "about_pcsxr1"); + g_signal_connect_data(G_OBJECT(widget), "activate", + G_CALLBACK(OnHelp_About), NULL, NULL, G_CONNECT_AFTER); + + // Toolbar + widget = gtk_builder_get_object(builder, "toolbutton_runcd"); + g_signal_connect_data(G_OBJECT(widget), "clicked", + G_CALLBACK(OnFile_RunCd), NULL, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(builder, "toolbutton_runimage"); + g_signal_connect_data(G_OBJECT(widget), "clicked", + G_CALLBACK(OnFile_RunImage), NULL, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(builder, "toolbutton_run"); + g_signal_connect_data(G_OBJECT(widget), "clicked", + G_CALLBACK(OnEmu_Run), NULL, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(builder, "toolbutton_switchimage"); + g_signal_connect_data(G_OBJECT(widget), "clicked", + G_CALLBACK(OnEmu_SwitchImage), NULL, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(builder, "toolbutton_memcards"); + g_signal_connect_data(G_OBJECT(widget), "clicked", + G_CALLBACK(OnConf_Mcds), NULL, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(builder, "toolbutton_graphics"); + g_signal_connect_data(G_OBJECT(widget), "clicked", + G_CALLBACK(OnConf_Graphics), NULL, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(builder, "toolbutton_sound"); + g_signal_connect_data(G_OBJECT(widget), "clicked", + G_CALLBACK(OnConf_Sound), NULL, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(builder, "toolbutton_cdrom"); + g_signal_connect_data(G_OBJECT(widget), "clicked", + G_CALLBACK(OnConf_CdRom), NULL, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(builder, "toolbutton_controllers"); + g_signal_connect_data(G_OBJECT(widget), "clicked", + G_CALLBACK(OnConf_Pad), NULL, NULL, G_CONNECT_AFTER); + + gtk_main(); +} + +void OnDestroy() { + if (!destroy) OnFile_Exit(); +} + +void destroy_main_window () { + destroy = 1; + gtk_widget_destroy(Window); + Window = NULL; + destroy = 0; + gtk_main_quit(); + while (gtk_events_pending()) gtk_main_iteration(); +} + +void OnFile_RunExe() { + GtkWidget *file_chooser; + + if (plugins_configured() == FALSE) { + ConfigurePlugins(); + } else { + file_chooser = gtk_file_chooser_dialog_new(_("Select PSX EXE File"), + NULL, GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); + + // Add file filters + GtkFileFilter *exefilter = gtk_file_filter_new (); + gtk_file_filter_add_pattern (exefilter, "*.exe"); + gtk_file_filter_add_pattern (exefilter, "*.psx"); + gtk_file_filter_add_pattern (exefilter, "*.cpe"); + gtk_file_filter_add_pattern (exefilter, "*.EXE"); + gtk_file_filter_add_pattern (exefilter, "*.PSX"); + gtk_file_filter_add_pattern (exefilter, "*.CPE"); + gtk_file_filter_set_name (exefilter, _("PlayStation Executable Files")); + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (file_chooser), exefilter); + GtkFileFilter *allfilter = gtk_file_filter_new (); + gtk_file_filter_add_pattern (allfilter, "*"); + gtk_file_filter_set_name (allfilter, _("All Files")); + gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (file_chooser), allfilter); + + // Set this to the config object and retain it - maybe LastUsedDir + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(file_chooser), getenv("HOME")); + + if (gtk_dialog_run(GTK_DIALOG(file_chooser)) == GTK_RESPONSE_ACCEPT) { + gchar *file; + + /* TODO Need to validate the file */ + + file = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(file_chooser)); + + gtk_widget_destroy (file_chooser); + destroy_main_window(); + + SetIsoFile(NULL); + LoadPlugins(); + NetOpened = FALSE; + + if (OpenPlugins() == -1) { + g_free(file); + SysRunGui(); + } else { + // Auto-detect: get region first, then rcnt-bios reset + SysReset(); + + if (Load(file) == 0) { + g_free(file); + psxCpu->Execute(); + } else { + g_free(file); + ClosePlugins(); + SysErrorMessage(_("Not a valid PSX file"), _("The file does not appear to be a valid Playstation executable")); + SysRunGui(); + } + } + } else + gtk_widget_destroy(file_chooser); + } +} + +void OnFile_RunCd() { + if (plugins_configured() == FALSE) { + ConfigurePlugins(); + return; + } + + destroy_main_window(); + + SetIsoFile(NULL); + LoadPlugins(); + NetOpened = FALSE; + + if (OpenPlugins() == -1) { + SysRunGui(); + return; + } + + if (CheckCdrom() == -1) { + /* Only check the CD if we are starting the console with a CD */ + ClosePlugins(); + SysErrorMessage (_("CD ROM failed"), _("The CD does not appear to be a valid Playstation CD")); + SysRunGui(); + return; + } + + // Auto-detect: get region first, then rcnt-bios reset + SysReset(); + + // Read main executable directly from CDRom and start it + if (LoadCdrom() == -1) { + ClosePlugins(); + SysErrorMessage(_("Could not load CD-ROM!"), _("The CD-ROM could not be loaded")); + SysRunGui(); + } + + psxCpu->Execute(); +} + +void OnFile_RunBios() { + if (plugins_configured() == FALSE) { + ConfigurePlugins(); + return; + } + + if (strcmp(Config.Bios, "HLE") == 0) { + SysErrorMessage (_("Could not run BIOS"), _("Running BIOS is not supported with Internal HLE BIOS.")); + return; + } + + destroy_main_window(); + + SetIsoFile(NULL); + LoadPlugins(); + NetOpened = FALSE; + + if (OpenPlugins() == -1) { + SysRunGui(); + return; + } + + SysReset(); + + CdromId[0] = '\0'; + CdromLabel[0] = '\0'; + + psxCpu->Execute(); +} + +static gchar *Open_Iso_Proc() { + GtkWidget *chooser; + gchar *filename; + GtkFileFilter *psxfilter, *allfilter; + static char current_folder[MAXPATHLEN] = ""; + + chooser = gtk_file_chooser_dialog_new (_("Open PSX Disc Image File"), + NULL, GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, GTK_RESPONSE_OK, + NULL); + + if (current_folder[0] == '\0') { + strcpy(current_folder, getenv("HOME")); + } + + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (chooser), current_folder); + + psxfilter = gtk_file_filter_new(); + gtk_file_filter_add_pattern(psxfilter, "*.bin"); + gtk_file_filter_add_pattern(psxfilter, "*.img"); + gtk_file_filter_add_pattern(psxfilter, "*.mdf"); + gtk_file_filter_add_pattern(psxfilter, "*.iso"); + gtk_file_filter_add_pattern(psxfilter, "*.BIN"); + gtk_file_filter_add_pattern(psxfilter, "*.IMG"); + gtk_file_filter_add_pattern(psxfilter, "*.MDF"); + gtk_file_filter_add_pattern(psxfilter, "*.ISO"); + gtk_file_filter_set_name(psxfilter, _("PSX Image Files (*.bin, *.img, *.mdf, *.iso)")); + gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (chooser), psxfilter); + + allfilter = gtk_file_filter_new(); + gtk_file_filter_add_pattern(allfilter, "*"); + gtk_file_filter_set_name(allfilter, _("All Files")); + gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (chooser), allfilter); + + if (gtk_dialog_run(GTK_DIALOG(chooser)) == GTK_RESPONSE_OK) { + gchar *path = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(chooser)); + + /* Workaround: + for some reasons gtk_file_chooser_get_current_folder return NULL + if a file is selected from "Recently Used" or "Searsh"*/ + if(path != NULL) { + strcpy(current_folder, path); + g_free(path); + } + + GSList * l = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER (chooser)); + if(l) { + filename = l->data; + + /* if the file was selected from "Recently Used" or "Searsh" + we need to extract the path from the filename to set it to current_folder*/ + if(path == NULL) { + strncpy(current_folder, filename, strrchr(filename, '/') - filename); + } + + /* free useless data */ + GSList * ll = l; + while(l->next) { + l = l->next; + g_free(l->data); + } + g_slist_free(ll); + + gtk_widget_destroy(GTK_WIDGET(chooser)); + while (gtk_events_pending()) gtk_main_iteration(); + return filename; + } else { + gtk_widget_destroy (GTK_WIDGET(chooser)); + while (gtk_events_pending()) gtk_main_iteration(); + return NULL; + } + } else { + gtk_widget_destroy (GTK_WIDGET(chooser)); + while (gtk_events_pending()) gtk_main_iteration(); + return NULL; + } +} + +void OnFile_RunImage() { + gchar *filename; + + if (plugins_configured() == FALSE) { + ConfigurePlugins(); + return; + } + + filename = Open_Iso_Proc(); + if (filename == NULL) { + return; + } + + destroy_main_window(); + + SetIsoFile(filename); + g_free(filename); + + LoadPlugins(); + NetOpened = FALSE; + + if (OpenPlugins() == -1) { + SysRunGui(); + return; + } + + if (CheckCdrom() == -1) { + // Only check the CD if we are starting the console with a CD + ClosePlugins(); + SysErrorMessage (_("CD ROM failed"), _("The CD does not appear to be a valid Playstation CD")); + SysRunGui(); + return; + } + + // Auto-detect: get region first, then rcnt-bios reset + SysReset(); + + // Read main executable directly from CDRom and start it + if (LoadCdrom() == -1) { + ClosePlugins(); + SysErrorMessage(_("Could not load CD-ROM!"), _("The CD-ROM could not be loaded")); + SysRunGui(); + } + + psxCpu->Execute(); +} + +void OnEmu_Run() { + if (plugins_configured() == FALSE) { + ConfigurePlugins(); + return; + } + + destroy_main_window(); + + if (OpenPlugins() == -1) { + SysRunGui(); + return; + } + + CheatSearchBackupMemory(); + psxCpu->Execute(); +} + +void OnEmu_Reset() { + if (plugins_configured() == FALSE) { + ConfigurePlugins(); + return; + } + + destroy_main_window(); + + if (OpenPlugins() == -1) { + SysRunGui(); + return; + } + + if (CheckCdrom() != -1) { + LoadCdrom(); + } + + // Auto-detect: get region first, then rcnt-bios reset + SysReset(); + + psxCpu->Execute(); +} + +void OnEmu_Shutdown() { + ReleasePlugins(); + SetIsoFile(NULL); + CdromId[0] = '\0'; + CdromLabel[0] = '\0'; + ResetMenuSlots(); +} + +void OnEmu_SwitchImage() { + gchar *filename; + + if (plugins_configured() == FALSE) { + ConfigurePlugins(); + return; + } + + filename = Open_Iso_Proc(); + if (filename == NULL) { + return; + } + + destroy_main_window(); + + SetIsoFile(filename); + g_free(filename); + + if (OpenPlugins() == -1) { + SysRunGui(); + return; + } + + SetCdOpenCaseTime(time(NULL) + 2); + + CheatSearchBackupMemory(); + psxCpu->Execute(); +} + +void OnFile_Exit() { + DIR *dir; + struct dirent *ent; + void *Handle; + gchar *plugin = NULL; + gchar *dotdir; + + dotdir = g_build_filename(getenv("HOME"), PLUGINS_DIR, NULL); + + // with this the problem with plugins that are linked with the pthread + // library is solved + + dir = opendir(dotdir); + if (dir != NULL) { + while ((ent = readdir(dir)) != NULL) { + plugin = g_build_filename(dotdir, ent->d_name, NULL); + + if (strstr(plugin, ".so") == NULL && strstr(plugin, ".dylib") == NULL) + continue; + Handle = dlopen(plugin, RTLD_NOW); + if (Handle == NULL) + continue; + + g_free(plugin); + } + } + g_free(dotdir); + + bind_textdomain_codeset(PACKAGE_NAME, ""); + if (UseGui) + gtk_main_quit(); + SysClose(); + exit(0); +} + +void state_load(gchar *state_filename) { + int ret; + char Text[MAXPATHLEN + 20]; + FILE *fp; + + // check if the state file actually exists + fp = fopen(state_filename, "rb"); + if (fp == NULL) { + // file does not exist + return; + } + + fclose(fp); + + // If the window exists, then we are loading the state from within + // within the PCSXR GUI. We need to initialise the plugins first + if (Window) { + destroy_main_window(); + + if (OpenPlugins() == -1) { + SysRunGui(); + return; + } + } + + ret = CheckState(state_filename); + + if (ret == 0) { + // Check the CD-ROM is valid + if (CheckCdrom() == -1) { + ClosePlugins(); + SysRunGui(); + return; + } + + // Auto-detect: region first, then rcnt reset + SysReset(); + ret = LoadState(state_filename); + + sprintf(Text, _("Loaded state %s."), state_filename); + GPU_displayText(Text); + } else { + sprintf(Text, _("Error loading state %s!"), state_filename); + GPU_displayText(Text); + } +} + +void state_save(gchar *state_filename) { + char Text[MAXPATHLEN + 20]; + + GPU_updateLace(); + + if (SaveState(state_filename) == 0) + sprintf(Text, _("Saved state %s."), state_filename); + else + sprintf(Text, _("Error saving state %s!"), state_filename); + + GPU_displayText(Text); +} + +void on_states_load (GtkWidget *widget, gpointer user_data) { + gchar *state_filename; + gint state = (int)user_data; + + state_filename = get_state_filename(state); + + state_load(state_filename); + + g_free(state_filename); + + psxCpu->Execute(); +} + +void on_states_save (GtkWidget *widget, gpointer user_data) { + gchar *state_filename; + gint state = (int)user_data; + + state_filename = get_state_filename(state); + + state_save(state_filename); + + g_free(state_filename); +} + +void on_states_load_other() { + GtkWidget *file_chooser; + gchar *SStateFile; + + SStateFile = g_strconcat(getenv("HOME"), STATES_DIR, NULL); + + file_chooser = gtk_file_chooser_dialog_new(_("Select State File"), NULL, GTK_FILE_CHOOSER_ACTION_OPEN, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + NULL); + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (file_chooser), SStateFile); + g_free(SStateFile); + + if (gtk_dialog_run(GTK_DIALOG(file_chooser)) == GTK_RESPONSE_ACCEPT) { + gchar *filename; + + filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(file_chooser)); + gtk_widget_destroy(file_chooser); + + state_load(filename); + + g_free(filename); + + psxCpu->Execute(); + } else + gtk_widget_destroy(file_chooser); +} + +void on_states_save_other() { + GtkWidget *file_chooser; + gchar *SStateFile; + + SStateFile = g_strconcat (getenv("HOME"), STATES_DIR, NULL); + + file_chooser = gtk_file_chooser_dialog_new(_("Select State File"), + NULL, GTK_FILE_CHOOSER_ACTION_SAVE, + GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, + GTK_STOCK_SAVE, GTK_RESPONSE_OK, + NULL); + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(file_chooser), SStateFile); + g_free(SStateFile); + + if (gtk_dialog_run (GTK_DIALOG(file_chooser)) == GTK_RESPONSE_OK) { + gchar *filename; + + filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER (file_chooser)); + gtk_widget_destroy(file_chooser); + + state_save(filename); + + g_free(filename); + } + else + gtk_widget_destroy(file_chooser); +} + +void OnHelp_About(GtkWidget *widget, gpointer user_data) { + RunAboutDialog(); +} + +void SysMessage(const char *fmt, ...) { + GtkWidget *Txt, *MsgDlg; + va_list list; + char msg[512]; + + va_start(list, fmt); + vsprintf(msg, fmt, list); + va_end(list); + + if (msg[strlen(msg) - 1] == '\n') + msg[strlen(msg) - 1] = 0; + + if (!UseGui) { + fprintf(stderr, "%s\n", msg); + return; + } + + MsgDlg = gtk_dialog_new_with_buttons(_("Notice"), NULL, + GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_NONE, NULL); + + gtk_window_set_position (GTK_WINDOW(MsgDlg), GTK_WIN_POS_CENTER); + + Txt = gtk_label_new (msg); + gtk_label_set_line_wrap(GTK_LABEL(Txt), TRUE); + gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area(GTK_DIALOG(MsgDlg))), Txt); + + gtk_widget_show (Txt); + gtk_widget_show_all (MsgDlg); + gtk_dialog_run (GTK_DIALOG(MsgDlg)); + gtk_widget_destroy (MsgDlg); +} + +void SysErrorMessage(gchar *primary, gchar *secondary) { + GtkWidget *message_dialog; + if (!UseGui) + printf ("%s - %s\n", primary, secondary); + else { + message_dialog = gtk_message_dialog_new(NULL, + GTK_DIALOG_MODAL, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_CLOSE, + primary, + NULL); + gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(message_dialog), + secondary); + + gtk_dialog_run(GTK_DIALOG(message_dialog)); + gtk_widget_destroy(message_dialog); + } +} + +void SysInfoMessage(gchar *primary, gchar *secondary) { + GtkWidget *message_dialog; + if (!UseGui) + printf ("%s - %s\n", primary, secondary); + else { + message_dialog = gtk_message_dialog_new(NULL, + GTK_DIALOG_MODAL, + GTK_MESSAGE_INFO, + GTK_BUTTONS_CLOSE, + primary, + NULL); + gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(message_dialog), + secondary); + + gtk_dialog_run(GTK_DIALOG(message_dialog)); + gtk_widget_destroy(message_dialog); + } +} diff --git a/gui/Makefile.am b/gui/Makefile.am index 07823a5b..040d53e9 100644 --- a/gui/Makefile.am +++ b/gui/Makefile.am @@ -14,7 +14,7 @@ pcsxr_SOURCES = \ nopic.h \ Plugin.c \ Config.c \ - Gtk2Gui.c \ + GtkGui.c \ MemcardDlg.c \ MemcardDlg.h \ ConfDlg.c \ diff --git a/plugins/dfinput/Makefile.am b/plugins/dfinput/Makefile.am index 55016cb0..bb8a48b9 100644 --- a/plugins/dfinput/Makefile.am +++ b/plugins/dfinput/Makefile.am @@ -13,7 +13,7 @@ AM_CPPFLAGS = -DLOCALE_DIR=\"${datadir}/locale/\" \ -I../../include -I../../libpcsxcore $(SDL_CFLAGS) bin_PROGRAMS = cfgDFInput -cfgDFInput_SOURCES = cfg-gtk2.c pad.h +cfgDFInput_SOURCES = cfg-gtk.c pad.h cfgDFInput_LDADD = $(GTK3_LIBS) $(SDL_LIBS) -lX11 glade_DATA = dfinput.ui diff --git a/plugins/dfinput/cfg-gtk.c b/plugins/dfinput/cfg-gtk.c new file mode 100644 index 00000000..941d7848 --- /dev/null +++ b/plugins/dfinput/cfg-gtk.c @@ -0,0 +1,785 @@ +/* + * Copyright (c) 2009, Wei Mingzhi . + * All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see . + */ + +#include "cfg.c" + +#include +#include +#include + +GtkWidget *MainWindow; +GtkBuilder *xml; + +const int DPad[DKEY_TOTAL] = { + DKEY_UP, + DKEY_DOWN, + DKEY_LEFT, + DKEY_RIGHT, + DKEY_CROSS, + DKEY_CIRCLE, + DKEY_SQUARE, + DKEY_TRIANGLE, + DKEY_L1, + DKEY_R1, + DKEY_L2, + DKEY_R2, + DKEY_SELECT, + DKEY_START, + DKEY_L3, + DKEY_R3, + DKEY_ANALOG +}; + +const char *DPadText[DKEY_TOTAL] = { + N_("D-Pad Up"), + N_("D-Pad Down"), + N_("D-Pad Left"), + N_("D-Pad Right"), + N_("Cross"), + N_("Circle"), + N_("Square"), + N_("Triangle"), + N_("L1"), + N_("R1"), + N_("L2"), + N_("R2"), + N_("Select"), + N_("Start"), + N_("L3"), + N_("R3"), + N_("Analog") +}; + +const char *AnalogText[] = { + N_("L-Stick Right"), + N_("L-Stick Left"), + N_("L-Stick Down"), + N_("L-Stick Up"), + N_("R-Stick Right"), + N_("R-Stick Left"), + N_("R-Stick Down"), + N_("R-Stick Up") +}; + +static int GetSelectedKeyIndex(int padnum) { + GtkTreeSelection *selection; + GtkTreeIter iter; + GtkTreeModel *model; + GtkTreePath *path; + gboolean selected; + int i; + + selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(gtk_builder_get_object(xml, padnum == 0 ? "treeview1" : "treeview2"))); + selected = gtk_tree_selection_get_selected(selection, &model, &iter); + + if (!selected) { + return -1; + } + + path = gtk_tree_model_get_path(model, &iter); + i = *gtk_tree_path_get_indices(path); + gtk_tree_path_free(path); + + return i; +} + +static void GetKeyDescription(char *buf, int joynum, int key) { + const char *hatname[16] = {_("Centered"), _("Up"), _("Right"), _("Rightup"), + _("Down"), "", _("Rightdown"), "", _("Left"), _("Leftup"), "", "", + _("Leftdown"), "", "", ""}; + + switch (g.cfg.PadDef[joynum].KeyDef[key].JoyEvType) { + case BUTTON: + sprintf(buf, _("Joystick: Button %d"), g.cfg.PadDef[joynum].KeyDef[key].J.Button); + break; + + case AXIS: + sprintf(buf, _("Joystick: Axis %d%c"), abs(g.cfg.PadDef[joynum].KeyDef[key].J.Axis) - 1, + g.cfg.PadDef[joynum].KeyDef[key].J.Axis > 0 ? '+' : '-'); + break; + + case HAT: + sprintf(buf, _("Joystick: Hat %d %s"), (g.cfg.PadDef[joynum].KeyDef[key].J.Hat >> 8), + hatname[g.cfg.PadDef[joynum].KeyDef[key].J.Hat & 0x0F]); + break; + + case NONE: + default: + buf[0] = '\0'; + break; + } + + if (g.cfg.PadDef[joynum].KeyDef[key].Key != 0) { + if (buf[0] != '\0') { + strcat(buf, " / "); + } + + strcat(buf, _("Keyboard:")); + strcat(buf, " "); + strcat(buf, XKeysymToString(g.cfg.PadDef[joynum].KeyDef[key].Key)); + } else if (buf[0] == '\0') { + strcpy(buf, _("(Not Set)")); + } +} + +static void GetAnalogDescription(char *buf, int joynum, int analognum, int dir) { + const char *hatname[16] = {_("Centered"), _("Up"), _("Right"), _("Rightup"), + _("Down"), "", _("Rightdown"), "", _("Left"), _("Leftup"), "", "", + _("Leftdown"), "", "", ""}; + + switch (g.cfg.PadDef[joynum].AnalogDef[analognum][dir].JoyEvType) { + case BUTTON: + sprintf(buf, _("Joystick: Button %d"), g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Button); + break; + + case AXIS: + sprintf(buf, _("Joystick: Axis %d%c"), abs(g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Axis) - 1, + g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Axis > 0 ? '+' : '-'); + break; + + case HAT: + sprintf(buf, _("Joystick: Hat %d %s"), (g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Hat >> 8), + hatname[g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Hat & 0x0F]); + break; + + case NONE: + default: + buf[0] = '\0'; + break; + } + + if (g.cfg.PadDef[joynum].AnalogDef[analognum][dir].Key != 0) { + if (buf[0] != '\0') { + strcat(buf, " / "); + } + + strcat(buf, _("Keyboard:")); + strcat(buf, " "); + strcat(buf, XKeysymToString(g.cfg.PadDef[joynum].AnalogDef[analognum][dir].Key)); + } else if (buf[0] == '\0') { + strcpy(buf, _("(Not Set)")); + } +} + +static void UpdateKeyList() { + const char *widgetname[2] = {"treeview1", "treeview2"}; + + GtkWidget *widget; + GtkListStore *store; + GtkTreeIter iter; + int i, j; + char buf[256]; + + for (i = 0; i < 2; i++) { + int total; + + switch(g.cfg.PadDef[i].Type) + { + case PSE_PAD_TYPE_MOUSE: + total = 0; + break; + case PSE_PAD_TYPE_STANDARD: + total = DKEY_TOTAL - 3; + break; + case PSE_PAD_TYPE_ANALOGPAD: + total = DKEY_TOTAL; + break; + } + + widget = gtk_builder_get_object(xml, widgetname[i]); + + store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_STRING); + + for (j = 0; j < total; j++) { + gtk_list_store_append(store, &iter); + GetKeyDescription(buf, i, DPad[j]); + gtk_list_store_set(store, &iter, 0, _(DPadText[j]), 1, buf, -1); + } + + if (g.cfg.PadDef[i].Type == PSE_PAD_TYPE_ANALOGPAD) { + for (j = 0; j < 8; j++) { + gtk_list_store_append(store, &iter); + GetAnalogDescription(buf, i, j / 4, j % 4); + gtk_list_store_set(store, &iter, 0, _(AnalogText[j]), 1, buf, -1); + } + } + + gtk_tree_view_set_model(GTK_TREE_VIEW(widget), GTK_TREE_MODEL(store)); + g_object_unref(G_OBJECT(store)); + gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widget), TRUE); + gtk_widget_show(widget); + } +} + +static void UpdateKey() { + const char *widgetname[2] = {"treeview1", "treeview2"}; + int i, index; + GtkWidget *widget; + GtkTreeModel *model; + GtkTreeIter iter; + GValue value = {0, }; + char buf[256]; + + for (i = 0; i < 2; i++) { + index = GetSelectedKeyIndex(i); + if (index == -1) continue; + + widget = gtk_builder_get_object(xml, widgetname[i]); + gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)), &model, &iter); + + if (index < DKEY_TOTAL) { + GetKeyDescription(buf, i, DPad[index]); + } else { + GetAnalogDescription(buf, i, (index - DKEY_TOTAL) / 4, (index - DKEY_TOTAL) % 4); + } + + g_value_init(&value, G_TYPE_STRING); + g_value_set_string(&value, buf); + gtk_list_store_set_value(GTK_LIST_STORE(model), &iter, 1, &value); + } +} + +static void OnConfigExit(GtkWidget *widget, gpointer user_data) { + SavePADConfig(); + + gtk_widget_destroy(widget); + SDL_Quit(); + XCloseDisplay(g.Disp); + + exit(0); +} + +static void TreeSelectionChanged(GtkTreeSelection *selection, gpointer user_data) { + GtkTreeIter iter; + GtkTreeModel *model; + GtkTreePath *path; + + gboolean selected; + int i; + + selected = gtk_tree_selection_get_selected(selection, &model, &iter); + + if (selected) { + path = gtk_tree_model_get_path(model, &iter); + i = *gtk_tree_path_get_indices(path); + gtk_tree_path_free(path); + + // If a row was selected, and the row is not blank, we can now enable + // some of the disabled widgets + if ((int)user_data == 0) { + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(xml, "btnchange1")), TRUE); + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(xml, "btnreset1")), TRUE); + } else { + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(xml, "btnchange2")), TRUE); + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(xml, "btnreset2")), TRUE); + } + } else { + if ((int)user_data == 0) { + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(xml, "btnchange1")), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(xml, "btnreset1")), FALSE); + } else { + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(xml, "btnchange2")), FALSE); + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(xml, "btnreset2")), FALSE); + } + } +} + +static void OnDeviceChanged(GtkWidget *widget, gpointer user_data) { + int n = (int)user_data, current = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); + current--; + g.cfg.PadDef[n].DevNum = current; +} + +static void OnTypeChanged(GtkWidget *widget, gpointer user_data) { + int n = (int)user_data, current = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); + + int padTypeList[] = { + PSE_PAD_TYPE_STANDARD, + PSE_PAD_TYPE_ANALOGPAD, + PSE_PAD_TYPE_MOUSE + }; + + g.cfg.PadDef[n].Type = padTypeList[current]; + + UpdateKeyList(); +} + +static void OnThreadedToggled(GtkWidget *widget, gpointer user_data) { + g.cfg.Threaded = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); +} + +static void OnVisualVibration1Toggled(GtkWidget *widget, gpointer user_data) { + g.cfg.PadDef[0].VisualVibration = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); +} + +static void OnVisualVibration2Toggled(GtkWidget *widget, gpointer user_data) { + g.cfg.PadDef[1].VisualVibration = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); +} + +static void OnHideCursorToggled(GtkWidget *widget, gpointer user_data) { + g.cfg.HideCursor = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); +} + +static void ReadDKeyEvent(int padnum, int key) { + SDL_Joystick *js; + time_t t; + GdkEvent *ge; + int i; + Sint16 axis, numAxes = 0, InitAxisPos[256], PrevAxisPos[256]; + unsigned char buttons[32]; + uint16_t Key; + + if (g.cfg.PadDef[padnum].DevNum >= 0) { + js = SDL_JoystickOpen(g.cfg.PadDef[padnum].DevNum); + SDL_JoystickEventState(SDL_IGNORE); + + SDL_JoystickUpdate(); + + numAxes = SDL_JoystickNumAxes(js); + if (numAxes > 256) numAxes = 256; + + for (i = 0; i < numAxes; i++) { + InitAxisPos[i] = PrevAxisPos[i] = SDL_JoystickGetAxis(js, i); + } + } else { + js = NULL; + } + + t = time(NULL); + + while (time(NULL) < t + 10) { + // check joystick events + if (js != NULL) { + SDL_JoystickUpdate(); + + for (i = 0; i < SDL_JoystickNumButtons(js); i++) { + if (SDL_JoystickGetButton(js, i)) { + g.cfg.PadDef[padnum].KeyDef[key].JoyEvType = BUTTON; + g.cfg.PadDef[padnum].KeyDef[key].J.Button = i; + goto end; + } + } + + for (i = 0; i < numAxes; i++) { + axis = SDL_JoystickGetAxis(js, i); + if (abs(axis) > 16383 && (abs(axis - InitAxisPos[i]) > 4096 || abs(axis - PrevAxisPos[i]) > 4096)) { + g.cfg.PadDef[padnum].KeyDef[key].JoyEvType = AXIS; + g.cfg.PadDef[padnum].KeyDef[key].J.Axis = (i + 1) * (axis > 0 ? 1 : -1); + goto end; + } + PrevAxisPos[i] = axis; + } + + for (i = 0; i < SDL_JoystickNumHats(js); i++) { + axis = SDL_JoystickGetHat(js, i); + if (axis != SDL_HAT_CENTERED) { + g.cfg.PadDef[padnum].KeyDef[key].JoyEvType = HAT; + + if (axis & SDL_HAT_UP) { + g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_UP); + } else if (axis & SDL_HAT_DOWN) { + g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_DOWN); + } else if (axis & SDL_HAT_LEFT) { + g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_LEFT); + } else if (axis & SDL_HAT_RIGHT) { + g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_RIGHT); + } + + goto end; + } + } + } + + // check keyboard events + XQueryKeymap(g.Disp, buttons); + for (i = 0; i < 256; ++i) { + if(buttons[i >> 3] & (1 << (i & 7))) { + Key = XkbKeycodeToKeysym(g.Disp, i, 0, 0); + if(Key != XK_Escape) { + g.cfg.PadDef[padnum].KeyDef[key].Key = Key; + } + goto end; + } + } + + usleep(5000); + } + +end: + if (js != NULL) { + SDL_JoystickClose(js); + } +} + +static void ReadAnalogEvent(int padnum, int analognum, int analogdir) { + SDL_Joystick *js; + time_t t; + GdkEvent *ge; + int i; + Sint16 axis, numAxes = 0, InitAxisPos[256], PrevAxisPos[256]; + unsigned char buttons[32]; + uint16_t Key; + + if (g.cfg.PadDef[padnum].DevNum >= 0) { + js = SDL_JoystickOpen(g.cfg.PadDef[padnum].DevNum); + SDL_JoystickEventState(SDL_IGNORE); + + SDL_JoystickUpdate(); + + numAxes = SDL_JoystickNumAxes(js); + if (numAxes > 256) numAxes = 256; + + for (i = 0; i < SDL_JoystickNumAxes(js); i++) { + InitAxisPos[i] = PrevAxisPos[i] = SDL_JoystickGetAxis(js, i); + } + } else { + js = NULL; + } + + t = time(NULL); + + while (time(NULL) < t + 10) { + // check joystick events + if (js != NULL) { + SDL_JoystickUpdate(); + + for (i = 0; i < SDL_JoystickNumButtons(js); i++) { + if (SDL_JoystickGetButton(js, i)) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].JoyEvType = BUTTON; + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Button = i; + goto end; + } + } + + for (i = 0; i < numAxes; i++) { + axis = SDL_JoystickGetAxis(js, i); + if (abs(axis) > 16383 && (abs(axis - InitAxisPos[i]) > 4096 || abs(axis - PrevAxisPos[i]) > 4096)) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].JoyEvType = AXIS; + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Axis = (i + 1) * (axis > 0 ? 1 : -1); + goto end; + } + PrevAxisPos[i] = axis; + } + + for (i = 0; i < SDL_JoystickNumHats(js); i++) { + axis = SDL_JoystickGetHat(js, i); + if (axis != SDL_HAT_CENTERED) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].JoyEvType = HAT; + + if (axis & SDL_HAT_UP) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_UP); + } else if (axis & SDL_HAT_DOWN) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_DOWN); + } else if (axis & SDL_HAT_LEFT) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_LEFT); + } else if (axis & SDL_HAT_RIGHT) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_RIGHT); + } + + goto end; + } + } + } + + // check keyboard events + XQueryKeymap(g.Disp, buttons); + for (i = 0; i < 256; ++i) { + if(buttons[i >> 3] & (1 << (i & 7))) { + Key = XkbKeycodeToKeysym(g.Disp, i, 0, 0); + if(Key != XK_Escape) { + g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].Key = Key; + } + goto end; + } + } + + usleep(5000); + } + +end: + if (js != NULL) { + SDL_JoystickClose(js); + } +} + +static void OnChangeClicked(GtkWidget *widget, gpointer user_data) { + int pad = (int)user_data; + int index = GetSelectedKeyIndex(pad); + + if (index == -1) return; + + if (index < DKEY_TOTAL) { + ReadDKeyEvent(pad, DPad[index]); + } else { + index -= DKEY_TOTAL; + ReadAnalogEvent(pad, index / 4, index % 4); + } + + UpdateKey(); +} + +static void OnResetClicked(GtkWidget *widget, gpointer user_data) { + int pad = (int)user_data; + int index = GetSelectedKeyIndex(pad); + + if (index == -1) return; + + if (index < DKEY_TOTAL) { + g.cfg.PadDef[pad].KeyDef[DPad[index]].Key = 0; + g.cfg.PadDef[pad].KeyDef[DPad[index]].JoyEvType = NONE; + g.cfg.PadDef[pad].KeyDef[DPad[index]].J.Button = 0; + } else { + index -= DKEY_TOTAL; + g.cfg.PadDef[pad].AnalogDef[index / 4][index % 4].Key = 0; + g.cfg.PadDef[pad].AnalogDef[index / 4][index % 4].JoyEvType = NONE; + g.cfg.PadDef[pad].AnalogDef[index / 4][index % 4].J.Button = 0; + } + + UpdateKey(); +} + +static void PopulateDevList() { + const char *widgetname[2] = {"combodev1", "combodev2"}; + int i, j, n; + GtkWidget *widget; + GtkTreeIter iter; + GtkListStore *store; + GtkCellRenderer *renderer; + char buf[256]; + + for (i = 0; i < 2; i++) { + widget = gtk_builder_get_object(xml, widgetname[i]); + + renderer = gtk_cell_renderer_text_new(); + gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(widget), renderer, FALSE); + gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(widget), renderer, "text", 0); + + store = gtk_list_store_new(1, G_TYPE_STRING); + + gtk_list_store_append(store, &iter); + gtk_list_store_set(store, &iter, 0, _("None"), -1); + + n = SDL_NumJoysticks(); + for (j = 0; j < n; j++) { + sprintf(buf, "%d: %s", j + 1, SDL_JoystickName(j)); + gtk_list_store_append(store, &iter); + gtk_list_store_set(store, &iter, 0, buf, -1); + } + + gtk_combo_box_set_model(GTK_COMBO_BOX(widget), GTK_TREE_MODEL(store)); + + n = g.cfg.PadDef[i].DevNum + 1; + if (n > SDL_NumJoysticks()) { + n = 0; + g.cfg.PadDef[i].DevNum = -1; + } + + gtk_combo_box_set_active(GTK_COMBO_BOX(widget), n); + } +} + +long PADconfigure() { + GtkWidget *widget; + GtkTreeSelection *treesel; + GtkTreeViewColumn *column; + GtkCellRenderer *renderer; + + if (SDL_Init(SDL_INIT_JOYSTICK) == -1) { + fprintf(stderr, "Failed to initialize SDL!\n"); + return -1; + } + + g.Disp = XOpenDisplay(NULL); + if (!g.Disp) { + fprintf(stderr, "XOpenDisplay failed!\n"); + return -1; + } + + LoadPADConfig(); + + xml = gtk_builder_new(); + + if (!gtk_builder_add_from_file(xml, DATADIR "dfinput.ui", NULL)) { + g_warning("We could not load the interface!"); + return -1; + } + + MainWindow = gtk_builder_get_object(xml, "CfgWnd"); + gtk_window_set_title(GTK_WINDOW(MainWindow), _("Gamepad/Keyboard Input Configuration")); + + widget = gtk_builder_get_object(xml, "treeview1"); + + // column for key + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(_("Key"), + renderer, "text", 0, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(widget), column); + + // column for button + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(_("Button"), + renderer, "text", 1, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(widget), column); + + treesel = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)); + gtk_tree_selection_set_mode(treesel, GTK_SELECTION_SINGLE); + + g_signal_connect_data(G_OBJECT(treesel), "changed", + G_CALLBACK(TreeSelectionChanged), (gpointer)0, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(xml, "treeview2"); + + // column for key + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(_("Key"), + renderer, "text", 0, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(widget), column); + + // column for button + renderer = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes(_("Button"), + renderer, "text", 1, NULL); + gtk_tree_view_append_column(GTK_TREE_VIEW(widget), column); + + treesel = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)); + gtk_tree_selection_set_mode(treesel, GTK_SELECTION_SINGLE); + + g_signal_connect_data(G_OBJECT(treesel), "changed", + G_CALLBACK(TreeSelectionChanged), (gpointer)1, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(xml, "CfgWnd"); + g_signal_connect_data(G_OBJECT(widget), "delete_event", + G_CALLBACK(OnConfigExit), NULL, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(xml, "btnclose"); + g_signal_connect_data(G_OBJECT(widget), "clicked", + G_CALLBACK(OnConfigExit), NULL, NULL, G_CONNECT_AFTER); + + PopulateDevList(); + UpdateKeyList(); + + widget = gtk_builder_get_object(xml, "checkmt"); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), g.cfg.Threaded); + g_signal_connect_data(G_OBJECT(widget), "toggled", + G_CALLBACK(OnThreadedToggled), NULL, NULL, G_CONNECT_AFTER); + +/* + widget = gtk_builder_get_object(xml, "checkcg"); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), g.cfg.HideCursor); + g_signal_connect_data(GTK_OBJECT(widget), "toggled", + G_CALLBACK(OnHideCursorToggled), NULL, NULL, G_CONNECT_AFTER); +*/ + widget = gtk_builder_get_object(xml, "combodev1"); + g_signal_connect_data(G_OBJECT(widget), "changed", + G_CALLBACK(OnDeviceChanged), (gpointer)0, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(xml, "combodev2"); + g_signal_connect_data(G_OBJECT(widget), "changed", + G_CALLBACK(OnDeviceChanged), (gpointer)1, NULL, G_CONNECT_AFTER); + + int padTypeList[] = { + 0, + 2, // PSE_PAD_TYPE_MOUSE + 0, // PSE_PAD_TYPE_NEGCON + 0, // PSE_PAD_TYPE_GUN + 0, // PSE_PAD_TYPE_STANDARD + 1, // PSE_PAD_TYPE_ANALOGJOY + 0, // PSE_PAD_TYPE_GUNCON + 1, //PSE_PAD_TYPE_ANALOGPAD + }; + + widget = gtk_builder_get_object(xml, "combotype1"); + gtk_combo_box_set_active(GTK_COMBO_BOX(widget), + padTypeList[g.cfg.PadDef[0].Type]); + g_signal_connect_data(G_OBJECT(widget), "changed", + G_CALLBACK(OnTypeChanged), (gpointer)0, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(xml, "combotype2"); + gtk_combo_box_set_active(GTK_COMBO_BOX(widget), + padTypeList[g.cfg.PadDef[1].Type]); + g_signal_connect_data(G_OBJECT(widget), "changed", + G_CALLBACK(OnTypeChanged), (gpointer)1, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(xml, "checkvv1"); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), g.cfg.PadDef[0].VisualVibration); + g_signal_connect_data(G_OBJECT(widget), "toggled", + G_CALLBACK(OnVisualVibration1Toggled), NULL, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(xml, "checkvv2"); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), g.cfg.PadDef[1].VisualVibration); + g_signal_connect_data(G_OBJECT(widget), "toggled", + G_CALLBACK(OnVisualVibration2Toggled), NULL, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(xml, "btnchange1"); + gtk_widget_set_sensitive(widget, FALSE); + g_signal_connect_data(G_OBJECT(widget), "clicked", + G_CALLBACK(OnChangeClicked), (gpointer)0, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(xml, "btnreset1"); + gtk_widget_set_sensitive(widget, FALSE); + g_signal_connect_data(G_OBJECT(widget), "clicked", + G_CALLBACK(OnResetClicked), (gpointer)0, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(xml, "btnchange2"); + gtk_widget_set_sensitive(widget, FALSE); + g_signal_connect_data(G_OBJECT(widget), "clicked", + G_CALLBACK(OnChangeClicked), (gpointer)1, NULL, G_CONNECT_AFTER); + + widget = gtk_builder_get_object(xml, "btnreset2"); + gtk_widget_set_sensitive(widget, FALSE); + g_signal_connect_data(G_OBJECT(widget), "clicked", + G_CALLBACK(OnResetClicked), (gpointer)1, NULL, G_CONNECT_AFTER); + + gtk_widget_show(MainWindow); + gtk_main(); + + return 0; +} + +void PADabout() { + const char *authors[]= {"Wei Mingzhi ", NULL}; + GtkWidget *widget; + + widget = gtk_about_dialog_new(); + gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(widget), "Gamepad/Keyboard Input"); + gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(widget), "1.1"); + gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(widget), authors); + gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(widget), "http://www.codeplex.com/pcsxr/"); + + gtk_dialog_run(GTK_DIALOG(widget)); + gtk_widget_destroy(widget); +} + +int main(int argc, char *argv[]) { +#ifdef ENABLE_NLS + setlocale(LC_ALL, ""); + bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR); + bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); + textdomain(GETTEXT_PACKAGE); +#endif + + gtk_init(&argc, &argv); + + if (argc > 1 && !strcmp(argv[1], "-about")) { + PADabout(); + } else { + PADconfigure(); + } + + return 0; +} diff --git a/plugins/dfinput/cfg-gtk2.c b/plugins/dfinput/cfg-gtk2.c deleted file mode 100755 index 941d7848..00000000 --- a/plugins/dfinput/cfg-gtk2.c +++ /dev/null @@ -1,785 +0,0 @@ -/* - * Copyright (c) 2009, Wei Mingzhi . - * All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see . - */ - -#include "cfg.c" - -#include -#include -#include - -GtkWidget *MainWindow; -GtkBuilder *xml; - -const int DPad[DKEY_TOTAL] = { - DKEY_UP, - DKEY_DOWN, - DKEY_LEFT, - DKEY_RIGHT, - DKEY_CROSS, - DKEY_CIRCLE, - DKEY_SQUARE, - DKEY_TRIANGLE, - DKEY_L1, - DKEY_R1, - DKEY_L2, - DKEY_R2, - DKEY_SELECT, - DKEY_START, - DKEY_L3, - DKEY_R3, - DKEY_ANALOG -}; - -const char *DPadText[DKEY_TOTAL] = { - N_("D-Pad Up"), - N_("D-Pad Down"), - N_("D-Pad Left"), - N_("D-Pad Right"), - N_("Cross"), - N_("Circle"), - N_("Square"), - N_("Triangle"), - N_("L1"), - N_("R1"), - N_("L2"), - N_("R2"), - N_("Select"), - N_("Start"), - N_("L3"), - N_("R3"), - N_("Analog") -}; - -const char *AnalogText[] = { - N_("L-Stick Right"), - N_("L-Stick Left"), - N_("L-Stick Down"), - N_("L-Stick Up"), - N_("R-Stick Right"), - N_("R-Stick Left"), - N_("R-Stick Down"), - N_("R-Stick Up") -}; - -static int GetSelectedKeyIndex(int padnum) { - GtkTreeSelection *selection; - GtkTreeIter iter; - GtkTreeModel *model; - GtkTreePath *path; - gboolean selected; - int i; - - selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(gtk_builder_get_object(xml, padnum == 0 ? "treeview1" : "treeview2"))); - selected = gtk_tree_selection_get_selected(selection, &model, &iter); - - if (!selected) { - return -1; - } - - path = gtk_tree_model_get_path(model, &iter); - i = *gtk_tree_path_get_indices(path); - gtk_tree_path_free(path); - - return i; -} - -static void GetKeyDescription(char *buf, int joynum, int key) { - const char *hatname[16] = {_("Centered"), _("Up"), _("Right"), _("Rightup"), - _("Down"), "", _("Rightdown"), "", _("Left"), _("Leftup"), "", "", - _("Leftdown"), "", "", ""}; - - switch (g.cfg.PadDef[joynum].KeyDef[key].JoyEvType) { - case BUTTON: - sprintf(buf, _("Joystick: Button %d"), g.cfg.PadDef[joynum].KeyDef[key].J.Button); - break; - - case AXIS: - sprintf(buf, _("Joystick: Axis %d%c"), abs(g.cfg.PadDef[joynum].KeyDef[key].J.Axis) - 1, - g.cfg.PadDef[joynum].KeyDef[key].J.Axis > 0 ? '+' : '-'); - break; - - case HAT: - sprintf(buf, _("Joystick: Hat %d %s"), (g.cfg.PadDef[joynum].KeyDef[key].J.Hat >> 8), - hatname[g.cfg.PadDef[joynum].KeyDef[key].J.Hat & 0x0F]); - break; - - case NONE: - default: - buf[0] = '\0'; - break; - } - - if (g.cfg.PadDef[joynum].KeyDef[key].Key != 0) { - if (buf[0] != '\0') { - strcat(buf, " / "); - } - - strcat(buf, _("Keyboard:")); - strcat(buf, " "); - strcat(buf, XKeysymToString(g.cfg.PadDef[joynum].KeyDef[key].Key)); - } else if (buf[0] == '\0') { - strcpy(buf, _("(Not Set)")); - } -} - -static void GetAnalogDescription(char *buf, int joynum, int analognum, int dir) { - const char *hatname[16] = {_("Centered"), _("Up"), _("Right"), _("Rightup"), - _("Down"), "", _("Rightdown"), "", _("Left"), _("Leftup"), "", "", - _("Leftdown"), "", "", ""}; - - switch (g.cfg.PadDef[joynum].AnalogDef[analognum][dir].JoyEvType) { - case BUTTON: - sprintf(buf, _("Joystick: Button %d"), g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Button); - break; - - case AXIS: - sprintf(buf, _("Joystick: Axis %d%c"), abs(g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Axis) - 1, - g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Axis > 0 ? '+' : '-'); - break; - - case HAT: - sprintf(buf, _("Joystick: Hat %d %s"), (g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Hat >> 8), - hatname[g.cfg.PadDef[joynum].AnalogDef[analognum][dir].J.Hat & 0x0F]); - break; - - case NONE: - default: - buf[0] = '\0'; - break; - } - - if (g.cfg.PadDef[joynum].AnalogDef[analognum][dir].Key != 0) { - if (buf[0] != '\0') { - strcat(buf, " / "); - } - - strcat(buf, _("Keyboard:")); - strcat(buf, " "); - strcat(buf, XKeysymToString(g.cfg.PadDef[joynum].AnalogDef[analognum][dir].Key)); - } else if (buf[0] == '\0') { - strcpy(buf, _("(Not Set)")); - } -} - -static void UpdateKeyList() { - const char *widgetname[2] = {"treeview1", "treeview2"}; - - GtkWidget *widget; - GtkListStore *store; - GtkTreeIter iter; - int i, j; - char buf[256]; - - for (i = 0; i < 2; i++) { - int total; - - switch(g.cfg.PadDef[i].Type) - { - case PSE_PAD_TYPE_MOUSE: - total = 0; - break; - case PSE_PAD_TYPE_STANDARD: - total = DKEY_TOTAL - 3; - break; - case PSE_PAD_TYPE_ANALOGPAD: - total = DKEY_TOTAL; - break; - } - - widget = gtk_builder_get_object(xml, widgetname[i]); - - store = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_STRING); - - for (j = 0; j < total; j++) { - gtk_list_store_append(store, &iter); - GetKeyDescription(buf, i, DPad[j]); - gtk_list_store_set(store, &iter, 0, _(DPadText[j]), 1, buf, -1); - } - - if (g.cfg.PadDef[i].Type == PSE_PAD_TYPE_ANALOGPAD) { - for (j = 0; j < 8; j++) { - gtk_list_store_append(store, &iter); - GetAnalogDescription(buf, i, j / 4, j % 4); - gtk_list_store_set(store, &iter, 0, _(AnalogText[j]), 1, buf, -1); - } - } - - gtk_tree_view_set_model(GTK_TREE_VIEW(widget), GTK_TREE_MODEL(store)); - g_object_unref(G_OBJECT(store)); - gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(widget), TRUE); - gtk_widget_show(widget); - } -} - -static void UpdateKey() { - const char *widgetname[2] = {"treeview1", "treeview2"}; - int i, index; - GtkWidget *widget; - GtkTreeModel *model; - GtkTreeIter iter; - GValue value = {0, }; - char buf[256]; - - for (i = 0; i < 2; i++) { - index = GetSelectedKeyIndex(i); - if (index == -1) continue; - - widget = gtk_builder_get_object(xml, widgetname[i]); - gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)), &model, &iter); - - if (index < DKEY_TOTAL) { - GetKeyDescription(buf, i, DPad[index]); - } else { - GetAnalogDescription(buf, i, (index - DKEY_TOTAL) / 4, (index - DKEY_TOTAL) % 4); - } - - g_value_init(&value, G_TYPE_STRING); - g_value_set_string(&value, buf); - gtk_list_store_set_value(GTK_LIST_STORE(model), &iter, 1, &value); - } -} - -static void OnConfigExit(GtkWidget *widget, gpointer user_data) { - SavePADConfig(); - - gtk_widget_destroy(widget); - SDL_Quit(); - XCloseDisplay(g.Disp); - - exit(0); -} - -static void TreeSelectionChanged(GtkTreeSelection *selection, gpointer user_data) { - GtkTreeIter iter; - GtkTreeModel *model; - GtkTreePath *path; - - gboolean selected; - int i; - - selected = gtk_tree_selection_get_selected(selection, &model, &iter); - - if (selected) { - path = gtk_tree_model_get_path(model, &iter); - i = *gtk_tree_path_get_indices(path); - gtk_tree_path_free(path); - - // If a row was selected, and the row is not blank, we can now enable - // some of the disabled widgets - if ((int)user_data == 0) { - gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(xml, "btnchange1")), TRUE); - gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(xml, "btnreset1")), TRUE); - } else { - gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(xml, "btnchange2")), TRUE); - gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(xml, "btnreset2")), TRUE); - } - } else { - if ((int)user_data == 0) { - gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(xml, "btnchange1")), FALSE); - gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(xml, "btnreset1")), FALSE); - } else { - gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(xml, "btnchange2")), FALSE); - gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(xml, "btnreset2")), FALSE); - } - } -} - -static void OnDeviceChanged(GtkWidget *widget, gpointer user_data) { - int n = (int)user_data, current = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); - current--; - g.cfg.PadDef[n].DevNum = current; -} - -static void OnTypeChanged(GtkWidget *widget, gpointer user_data) { - int n = (int)user_data, current = gtk_combo_box_get_active(GTK_COMBO_BOX(widget)); - - int padTypeList[] = { - PSE_PAD_TYPE_STANDARD, - PSE_PAD_TYPE_ANALOGPAD, - PSE_PAD_TYPE_MOUSE - }; - - g.cfg.PadDef[n].Type = padTypeList[current]; - - UpdateKeyList(); -} - -static void OnThreadedToggled(GtkWidget *widget, gpointer user_data) { - g.cfg.Threaded = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); -} - -static void OnVisualVibration1Toggled(GtkWidget *widget, gpointer user_data) { - g.cfg.PadDef[0].VisualVibration = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); -} - -static void OnVisualVibration2Toggled(GtkWidget *widget, gpointer user_data) { - g.cfg.PadDef[1].VisualVibration = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); -} - -static void OnHideCursorToggled(GtkWidget *widget, gpointer user_data) { - g.cfg.HideCursor = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)); -} - -static void ReadDKeyEvent(int padnum, int key) { - SDL_Joystick *js; - time_t t; - GdkEvent *ge; - int i; - Sint16 axis, numAxes = 0, InitAxisPos[256], PrevAxisPos[256]; - unsigned char buttons[32]; - uint16_t Key; - - if (g.cfg.PadDef[padnum].DevNum >= 0) { - js = SDL_JoystickOpen(g.cfg.PadDef[padnum].DevNum); - SDL_JoystickEventState(SDL_IGNORE); - - SDL_JoystickUpdate(); - - numAxes = SDL_JoystickNumAxes(js); - if (numAxes > 256) numAxes = 256; - - for (i = 0; i < numAxes; i++) { - InitAxisPos[i] = PrevAxisPos[i] = SDL_JoystickGetAxis(js, i); - } - } else { - js = NULL; - } - - t = time(NULL); - - while (time(NULL) < t + 10) { - // check joystick events - if (js != NULL) { - SDL_JoystickUpdate(); - - for (i = 0; i < SDL_JoystickNumButtons(js); i++) { - if (SDL_JoystickGetButton(js, i)) { - g.cfg.PadDef[padnum].KeyDef[key].JoyEvType = BUTTON; - g.cfg.PadDef[padnum].KeyDef[key].J.Button = i; - goto end; - } - } - - for (i = 0; i < numAxes; i++) { - axis = SDL_JoystickGetAxis(js, i); - if (abs(axis) > 16383 && (abs(axis - InitAxisPos[i]) > 4096 || abs(axis - PrevAxisPos[i]) > 4096)) { - g.cfg.PadDef[padnum].KeyDef[key].JoyEvType = AXIS; - g.cfg.PadDef[padnum].KeyDef[key].J.Axis = (i + 1) * (axis > 0 ? 1 : -1); - goto end; - } - PrevAxisPos[i] = axis; - } - - for (i = 0; i < SDL_JoystickNumHats(js); i++) { - axis = SDL_JoystickGetHat(js, i); - if (axis != SDL_HAT_CENTERED) { - g.cfg.PadDef[padnum].KeyDef[key].JoyEvType = HAT; - - if (axis & SDL_HAT_UP) { - g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_UP); - } else if (axis & SDL_HAT_DOWN) { - g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_DOWN); - } else if (axis & SDL_HAT_LEFT) { - g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_LEFT); - } else if (axis & SDL_HAT_RIGHT) { - g.cfg.PadDef[padnum].KeyDef[key].J.Hat = ((i << 8) | SDL_HAT_RIGHT); - } - - goto end; - } - } - } - - // check keyboard events - XQueryKeymap(g.Disp, buttons); - for (i = 0; i < 256; ++i) { - if(buttons[i >> 3] & (1 << (i & 7))) { - Key = XkbKeycodeToKeysym(g.Disp, i, 0, 0); - if(Key != XK_Escape) { - g.cfg.PadDef[padnum].KeyDef[key].Key = Key; - } - goto end; - } - } - - usleep(5000); - } - -end: - if (js != NULL) { - SDL_JoystickClose(js); - } -} - -static void ReadAnalogEvent(int padnum, int analognum, int analogdir) { - SDL_Joystick *js; - time_t t; - GdkEvent *ge; - int i; - Sint16 axis, numAxes = 0, InitAxisPos[256], PrevAxisPos[256]; - unsigned char buttons[32]; - uint16_t Key; - - if (g.cfg.PadDef[padnum].DevNum >= 0) { - js = SDL_JoystickOpen(g.cfg.PadDef[padnum].DevNum); - SDL_JoystickEventState(SDL_IGNORE); - - SDL_JoystickUpdate(); - - numAxes = SDL_JoystickNumAxes(js); - if (numAxes > 256) numAxes = 256; - - for (i = 0; i < SDL_JoystickNumAxes(js); i++) { - InitAxisPos[i] = PrevAxisPos[i] = SDL_JoystickGetAxis(js, i); - } - } else { - js = NULL; - } - - t = time(NULL); - - while (time(NULL) < t + 10) { - // check joystick events - if (js != NULL) { - SDL_JoystickUpdate(); - - for (i = 0; i < SDL_JoystickNumButtons(js); i++) { - if (SDL_JoystickGetButton(js, i)) { - g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].JoyEvType = BUTTON; - g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Button = i; - goto end; - } - } - - for (i = 0; i < numAxes; i++) { - axis = SDL_JoystickGetAxis(js, i); - if (abs(axis) > 16383 && (abs(axis - InitAxisPos[i]) > 4096 || abs(axis - PrevAxisPos[i]) > 4096)) { - g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].JoyEvType = AXIS; - g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Axis = (i + 1) * (axis > 0 ? 1 : -1); - goto end; - } - PrevAxisPos[i] = axis; - } - - for (i = 0; i < SDL_JoystickNumHats(js); i++) { - axis = SDL_JoystickGetHat(js, i); - if (axis != SDL_HAT_CENTERED) { - g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].JoyEvType = HAT; - - if (axis & SDL_HAT_UP) { - g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_UP); - } else if (axis & SDL_HAT_DOWN) { - g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_DOWN); - } else if (axis & SDL_HAT_LEFT) { - g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_LEFT); - } else if (axis & SDL_HAT_RIGHT) { - g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].J.Hat = ((i << 8) | SDL_HAT_RIGHT); - } - - goto end; - } - } - } - - // check keyboard events - XQueryKeymap(g.Disp, buttons); - for (i = 0; i < 256; ++i) { - if(buttons[i >> 3] & (1 << (i & 7))) { - Key = XkbKeycodeToKeysym(g.Disp, i, 0, 0); - if(Key != XK_Escape) { - g.cfg.PadDef[padnum].AnalogDef[analognum][analogdir].Key = Key; - } - goto end; - } - } - - usleep(5000); - } - -end: - if (js != NULL) { - SDL_JoystickClose(js); - } -} - -static void OnChangeClicked(GtkWidget *widget, gpointer user_data) { - int pad = (int)user_data; - int index = GetSelectedKeyIndex(pad); - - if (index == -1) return; - - if (index < DKEY_TOTAL) { - ReadDKeyEvent(pad, DPad[index]); - } else { - index -= DKEY_TOTAL; - ReadAnalogEvent(pad, index / 4, index % 4); - } - - UpdateKey(); -} - -static void OnResetClicked(GtkWidget *widget, gpointer user_data) { - int pad = (int)user_data; - int index = GetSelectedKeyIndex(pad); - - if (index == -1) return; - - if (index < DKEY_TOTAL) { - g.cfg.PadDef[pad].KeyDef[DPad[index]].Key = 0; - g.cfg.PadDef[pad].KeyDef[DPad[index]].JoyEvType = NONE; - g.cfg.PadDef[pad].KeyDef[DPad[index]].J.Button = 0; - } else { - index -= DKEY_TOTAL; - g.cfg.PadDef[pad].AnalogDef[index / 4][index % 4].Key = 0; - g.cfg.PadDef[pad].AnalogDef[index / 4][index % 4].JoyEvType = NONE; - g.cfg.PadDef[pad].AnalogDef[index / 4][index % 4].J.Button = 0; - } - - UpdateKey(); -} - -static void PopulateDevList() { - const char *widgetname[2] = {"combodev1", "combodev2"}; - int i, j, n; - GtkWidget *widget; - GtkTreeIter iter; - GtkListStore *store; - GtkCellRenderer *renderer; - char buf[256]; - - for (i = 0; i < 2; i++) { - widget = gtk_builder_get_object(xml, widgetname[i]); - - renderer = gtk_cell_renderer_text_new(); - gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(widget), renderer, FALSE); - gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(widget), renderer, "text", 0); - - store = gtk_list_store_new(1, G_TYPE_STRING); - - gtk_list_store_append(store, &iter); - gtk_list_store_set(store, &iter, 0, _("None"), -1); - - n = SDL_NumJoysticks(); - for (j = 0; j < n; j++) { - sprintf(buf, "%d: %s", j + 1, SDL_JoystickName(j)); - gtk_list_store_append(store, &iter); - gtk_list_store_set(store, &iter, 0, buf, -1); - } - - gtk_combo_box_set_model(GTK_COMBO_BOX(widget), GTK_TREE_MODEL(store)); - - n = g.cfg.PadDef[i].DevNum + 1; - if (n > SDL_NumJoysticks()) { - n = 0; - g.cfg.PadDef[i].DevNum = -1; - } - - gtk_combo_box_set_active(GTK_COMBO_BOX(widget), n); - } -} - -long PADconfigure() { - GtkWidget *widget; - GtkTreeSelection *treesel; - GtkTreeViewColumn *column; - GtkCellRenderer *renderer; - - if (SDL_Init(SDL_INIT_JOYSTICK) == -1) { - fprintf(stderr, "Failed to initialize SDL!\n"); - return -1; - } - - g.Disp = XOpenDisplay(NULL); - if (!g.Disp) { - fprintf(stderr, "XOpenDisplay failed!\n"); - return -1; - } - - LoadPADConfig(); - - xml = gtk_builder_new(); - - if (!gtk_builder_add_from_file(xml, DATADIR "dfinput.ui", NULL)) { - g_warning("We could not load the interface!"); - return -1; - } - - MainWindow = gtk_builder_get_object(xml, "CfgWnd"); - gtk_window_set_title(GTK_WINDOW(MainWindow), _("Gamepad/Keyboard Input Configuration")); - - widget = gtk_builder_get_object(xml, "treeview1"); - - // column for key - renderer = gtk_cell_renderer_text_new(); - column = gtk_tree_view_column_new_with_attributes(_("Key"), - renderer, "text", 0, NULL); - gtk_tree_view_append_column(GTK_TREE_VIEW(widget), column); - - // column for button - renderer = gtk_cell_renderer_text_new(); - column = gtk_tree_view_column_new_with_attributes(_("Button"), - renderer, "text", 1, NULL); - gtk_tree_view_append_column(GTK_TREE_VIEW(widget), column); - - treesel = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)); - gtk_tree_selection_set_mode(treesel, GTK_SELECTION_SINGLE); - - g_signal_connect_data(G_OBJECT(treesel), "changed", - G_CALLBACK(TreeSelectionChanged), (gpointer)0, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(xml, "treeview2"); - - // column for key - renderer = gtk_cell_renderer_text_new(); - column = gtk_tree_view_column_new_with_attributes(_("Key"), - renderer, "text", 0, NULL); - gtk_tree_view_append_column(GTK_TREE_VIEW(widget), column); - - // column for button - renderer = gtk_cell_renderer_text_new(); - column = gtk_tree_view_column_new_with_attributes(_("Button"), - renderer, "text", 1, NULL); - gtk_tree_view_append_column(GTK_TREE_VIEW(widget), column); - - treesel = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget)); - gtk_tree_selection_set_mode(treesel, GTK_SELECTION_SINGLE); - - g_signal_connect_data(G_OBJECT(treesel), "changed", - G_CALLBACK(TreeSelectionChanged), (gpointer)1, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(xml, "CfgWnd"); - g_signal_connect_data(G_OBJECT(widget), "delete_event", - G_CALLBACK(OnConfigExit), NULL, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(xml, "btnclose"); - g_signal_connect_data(G_OBJECT(widget), "clicked", - G_CALLBACK(OnConfigExit), NULL, NULL, G_CONNECT_AFTER); - - PopulateDevList(); - UpdateKeyList(); - - widget = gtk_builder_get_object(xml, "checkmt"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), g.cfg.Threaded); - g_signal_connect_data(G_OBJECT(widget), "toggled", - G_CALLBACK(OnThreadedToggled), NULL, NULL, G_CONNECT_AFTER); - -/* - widget = gtk_builder_get_object(xml, "checkcg"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), g.cfg.HideCursor); - g_signal_connect_data(GTK_OBJECT(widget), "toggled", - G_CALLBACK(OnHideCursorToggled), NULL, NULL, G_CONNECT_AFTER); -*/ - widget = gtk_builder_get_object(xml, "combodev1"); - g_signal_connect_data(G_OBJECT(widget), "changed", - G_CALLBACK(OnDeviceChanged), (gpointer)0, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(xml, "combodev2"); - g_signal_connect_data(G_OBJECT(widget), "changed", - G_CALLBACK(OnDeviceChanged), (gpointer)1, NULL, G_CONNECT_AFTER); - - int padTypeList[] = { - 0, - 2, // PSE_PAD_TYPE_MOUSE - 0, // PSE_PAD_TYPE_NEGCON - 0, // PSE_PAD_TYPE_GUN - 0, // PSE_PAD_TYPE_STANDARD - 1, // PSE_PAD_TYPE_ANALOGJOY - 0, // PSE_PAD_TYPE_GUNCON - 1, //PSE_PAD_TYPE_ANALOGPAD - }; - - widget = gtk_builder_get_object(xml, "combotype1"); - gtk_combo_box_set_active(GTK_COMBO_BOX(widget), - padTypeList[g.cfg.PadDef[0].Type]); - g_signal_connect_data(G_OBJECT(widget), "changed", - G_CALLBACK(OnTypeChanged), (gpointer)0, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(xml, "combotype2"); - gtk_combo_box_set_active(GTK_COMBO_BOX(widget), - padTypeList[g.cfg.PadDef[1].Type]); - g_signal_connect_data(G_OBJECT(widget), "changed", - G_CALLBACK(OnTypeChanged), (gpointer)1, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(xml, "checkvv1"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), g.cfg.PadDef[0].VisualVibration); - g_signal_connect_data(G_OBJECT(widget), "toggled", - G_CALLBACK(OnVisualVibration1Toggled), NULL, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(xml, "checkvv2"); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), g.cfg.PadDef[1].VisualVibration); - g_signal_connect_data(G_OBJECT(widget), "toggled", - G_CALLBACK(OnVisualVibration2Toggled), NULL, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(xml, "btnchange1"); - gtk_widget_set_sensitive(widget, FALSE); - g_signal_connect_data(G_OBJECT(widget), "clicked", - G_CALLBACK(OnChangeClicked), (gpointer)0, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(xml, "btnreset1"); - gtk_widget_set_sensitive(widget, FALSE); - g_signal_connect_data(G_OBJECT(widget), "clicked", - G_CALLBACK(OnResetClicked), (gpointer)0, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(xml, "btnchange2"); - gtk_widget_set_sensitive(widget, FALSE); - g_signal_connect_data(G_OBJECT(widget), "clicked", - G_CALLBACK(OnChangeClicked), (gpointer)1, NULL, G_CONNECT_AFTER); - - widget = gtk_builder_get_object(xml, "btnreset2"); - gtk_widget_set_sensitive(widget, FALSE); - g_signal_connect_data(G_OBJECT(widget), "clicked", - G_CALLBACK(OnResetClicked), (gpointer)1, NULL, G_CONNECT_AFTER); - - gtk_widget_show(MainWindow); - gtk_main(); - - return 0; -} - -void PADabout() { - const char *authors[]= {"Wei Mingzhi ", NULL}; - GtkWidget *widget; - - widget = gtk_about_dialog_new(); - gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(widget), "Gamepad/Keyboard Input"); - gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(widget), "1.1"); - gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(widget), authors); - gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(widget), "http://www.codeplex.com/pcsxr/"); - - gtk_dialog_run(GTK_DIALOG(widget)); - gtk_widget_destroy(widget); -} - -int main(int argc, char *argv[]) { -#ifdef ENABLE_NLS - setlocale(LC_ALL, ""); - bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR); - bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); - textdomain(GETTEXT_PACKAGE); -#endif - - gtk_init(&argc, &argv); - - if (argc > 1 && !strcmp(argv[1], "-about")) { - PADabout(); - } else { - PADconfigure(); - } - - return 0; -} diff --git a/po/POTFILES.in b/po/POTFILES.in index 9f01dd7d..25c36002 100755 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -8,7 +8,7 @@ gui/ConfDlg.h gui/Config.c gui/DebugMemory.c gui/DebugMemory.h -gui/Gtk2Gui.c +gui/GtkGui.c gui/Linux.h gui/LnxMain.c gui/MemcardDlg.c @@ -46,7 +46,7 @@ plugins/dfcdrom/cdr-null.c plugins/dfcdrom/cfg.c plugins/dfinput/analog.c plugins/dfinput/cfg.c -plugins/dfinput/cfg-gtk2.c +plugins/dfinput/cfg-gtk.c [type: gettext/glade]plugins/dfinput/dfinput.ui plugins/dfinput/pad.c plugins/dfinput/sdljoy.c diff --git a/po/fr_FR.po b/po/fr_FR.po index e26710a9..d7773da9 100755 --- a/po/fr_FR.po +++ b/po/fr_FR.po @@ -558,7 +558,7 @@ msgstr "Ouvrir un fichier de codes" msgid "PCSXR Cheat Code Files (*.cht)" msgstr "Codes de triche PCSXR (*.cht)" -#: ../gui/Cheat.c:309 ../gui/Gtk2Gui.c:475 ../gui/Gtk2Gui.c:616 +#: ../gui/Cheat.c:309 ../gui/GtkGui.c:475 ../gui/GtkGui.c:616 #: ../win32/gui/WndMain.c:1464 ../win32/gui/WndMain.c:1545 msgid "All Files" msgstr "Tous les fichiers" @@ -698,91 +698,91 @@ msgstr "Adresse" msgid "Text" msgstr "Texte" -#: ../gui/Gtk2Gui.c:139 +#: ../gui/GtkGui.c:139 msgid "Ready" msgstr "Prêt" -#: ../gui/Gtk2Gui.c:180 +#: ../gui/GtkGui.c:180 msgid "Emulation Paused." msgstr "Émulation en pause." -#: ../gui/Gtk2Gui.c:458 +#: ../gui/GtkGui.c:458 msgid "Select PSX EXE File" msgstr "Sélectionner un fichier EXE PSX" -#: ../gui/Gtk2Gui.c:471 +#: ../gui/GtkGui.c:471 msgid "PlayStation Executable Files" msgstr "Fichiers exécutables PlayStation" -#: ../gui/Gtk2Gui.c:508 +#: ../gui/GtkGui.c:508 msgid "Not a valid PSX file" msgstr "Ceci n'est pas un fichier PSX valide" -#: ../gui/Gtk2Gui.c:508 +#: ../gui/GtkGui.c:508 msgid "The file does not appear to be a valid Playstation executable" msgstr "Le fichier n'est pas un exécutable PlayStation valide" -#: ../gui/Gtk2Gui.c:537 ../gui/Gtk2Gui.c:692 +#: ../gui/GtkGui.c:537 ../gui/GtkGui.c:692 msgid "CD ROM failed" msgstr "Plantage du CD ROM" -#: ../gui/Gtk2Gui.c:537 ../gui/Gtk2Gui.c:692 ../win32/gui/WndMain.c:469 +#: ../gui/GtkGui.c:537 ../gui/GtkGui.c:692 ../win32/gui/WndMain.c:469 #: ../win32/gui/WndMain.c:521 ../win32/gui/WndMain.c:590 #, c-format msgid "The CD does not appear to be a valid Playstation CD" msgstr "Ce CD n'est pas un CD de PlayStation valide" -#: ../gui/Gtk2Gui.c:548 ../gui/Gtk2Gui.c:703 ../win32/gui/WndMain.c:479 +#: ../gui/GtkGui.c:548 ../gui/GtkGui.c:703 ../win32/gui/WndMain.c:479 #: ../win32/gui/WndMain.c:531 ../win32/gui/WndMain.c:600 #, c-format msgid "Could not load CD-ROM!" msgstr "Impossible de charger le CD-ROM !" -#: ../gui/Gtk2Gui.c:548 ../gui/Gtk2Gui.c:703 +#: ../gui/GtkGui.c:548 ../gui/GtkGui.c:703 msgid "The CD-ROM could not be loaded" msgstr "Le CD-ROM n'a pas pû être chargé" -#: ../gui/Gtk2Gui.c:562 +#: ../gui/GtkGui.c:562 msgid "Could not run BIOS" msgstr "Impossible de lancer le BIOS" -#: ../gui/Gtk2Gui.c:562 +#: ../gui/GtkGui.c:562 msgid "Running BIOS is not supported with Internal HLE BIOS." msgstr "Le lancement du BIOS n'est pas supporté en mode Internal HLE BIOS." -#: ../gui/Gtk2Gui.c:591 +#: ../gui/GtkGui.c:591 msgid "Open PSX Disc Image File" msgstr "Ouvrir une image de disque PSX" -#: ../gui/Gtk2Gui.c:611 +#: ../gui/GtkGui.c:611 msgid "PSX Image Files (*.bin, *.img, *.mdf, *.iso)" msgstr "Images de disques PSX (*.bin, *.img, *.mdf, *.iso)" -#: ../gui/Gtk2Gui.c:864 +#: ../gui/GtkGui.c:864 #, c-format msgid "Loaded state %s." msgstr "État chargé %s." -#: ../gui/Gtk2Gui.c:867 +#: ../gui/GtkGui.c:867 #, c-format msgid "Error loading state %s!" msgstr "Érreur lors du chargement de l'état %s !" -#: ../gui/Gtk2Gui.c:878 +#: ../gui/GtkGui.c:878 #, c-format msgid "Saved state %s." msgstr "État sauvé %s." -#: ../gui/Gtk2Gui.c:880 +#: ../gui/GtkGui.c:880 #, c-format msgid "Error saving state %s!" msgstr "Érreur lors de l'enregistrement de l'état %s !" -#: ../gui/Gtk2Gui.c:915 ../gui/Gtk2Gui.c:943 +#: ../gui/GtkGui.c:915 ../gui/GtkGui.c:943 msgid "Select State File" msgstr "Sélectionner un fichier d'état" -#: ../gui/Gtk2Gui.c:986 +#: ../gui/GtkGui.c:986 msgid "Notice" msgstr "" @@ -1303,183 +1303,183 @@ msgstr "" msgid "32min" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:49 +#: ../plugins/dfinput/cfg-gtk.c:49 msgid "D-Pad Up" msgstr "Pavé directionnel Haut" -#: ../plugins/dfinput/cfg-gtk2.c:50 +#: ../plugins/dfinput/cfg-gtk.c:50 msgid "D-Pad Down" msgstr "Pavé directionnel Bas" -#: ../plugins/dfinput/cfg-gtk2.c:51 +#: ../plugins/dfinput/cfg-gtk.c:51 msgid "D-Pad Left" msgstr "Pavé directionnel Gauche" -#: ../plugins/dfinput/cfg-gtk2.c:52 +#: ../plugins/dfinput/cfg-gtk.c:52 msgid "D-Pad Right" msgstr "Pavé directionnel Droite" -#: ../plugins/dfinput/cfg-gtk2.c:53 +#: ../plugins/dfinput/cfg-gtk.c:53 msgid "Cross" msgstr "Croix" -#: ../plugins/dfinput/cfg-gtk2.c:54 +#: ../plugins/dfinput/cfg-gtk.c:54 msgid "Circle" msgstr "Rond" -#: ../plugins/dfinput/cfg-gtk2.c:55 +#: ../plugins/dfinput/cfg-gtk.c:55 msgid "Square" msgstr "Carré" -#: ../plugins/dfinput/cfg-gtk2.c:56 +#: ../plugins/dfinput/cfg-gtk.c:56 msgid "Triangle" msgstr "Triangle" -#: ../plugins/dfinput/cfg-gtk2.c:57 +#: ../plugins/dfinput/cfg-gtk.c:57 msgid "L1" msgstr "L1" -#: ../plugins/dfinput/cfg-gtk2.c:58 +#: ../plugins/dfinput/cfg-gtk.c:58 msgid "R1" msgstr "R1" -#: ../plugins/dfinput/cfg-gtk2.c:59 +#: ../plugins/dfinput/cfg-gtk.c:59 msgid "L2" msgstr "L2" -#: ../plugins/dfinput/cfg-gtk2.c:60 +#: ../plugins/dfinput/cfg-gtk.c:60 msgid "R2" msgstr "R2" -#: ../plugins/dfinput/cfg-gtk2.c:61 +#: ../plugins/dfinput/cfg-gtk.c:61 msgid "Select" msgstr "Select" -#: ../plugins/dfinput/cfg-gtk2.c:62 +#: ../plugins/dfinput/cfg-gtk.c:62 msgid "Start" msgstr "Start" -#: ../plugins/dfinput/cfg-gtk2.c:63 +#: ../plugins/dfinput/cfg-gtk.c:63 msgid "L3" msgstr "L3" -#: ../plugins/dfinput/cfg-gtk2.c:64 +#: ../plugins/dfinput/cfg-gtk.c:64 msgid "R3" msgstr "R3" -#: ../plugins/dfinput/cfg-gtk2.c:65 +#: ../plugins/dfinput/cfg-gtk.c:65 #, fuzzy msgid "Analog" msgstr "" "Pavé digital\n" "Pavé analogique" -#: ../plugins/dfinput/cfg-gtk2.c:69 +#: ../plugins/dfinput/cfg-gtk.c:69 msgid "L-Stick Right" msgstr "L-Stick Droite" -#: ../plugins/dfinput/cfg-gtk2.c:70 +#: ../plugins/dfinput/cfg-gtk.c:70 msgid "L-Stick Left" msgstr "L-Stick Gauche" -#: ../plugins/dfinput/cfg-gtk2.c:71 +#: ../plugins/dfinput/cfg-gtk.c:71 msgid "L-Stick Down" msgstr "L-Stick Bas" -#: ../plugins/dfinput/cfg-gtk2.c:72 +#: ../plugins/dfinput/cfg-gtk.c:72 msgid "L-Stick Up" msgstr "L-Stick Haut" -#: ../plugins/dfinput/cfg-gtk2.c:73 +#: ../plugins/dfinput/cfg-gtk.c:73 msgid "R-Stick Right" msgstr "R-Stick Droite" -#: ../plugins/dfinput/cfg-gtk2.c:74 +#: ../plugins/dfinput/cfg-gtk.c:74 msgid "R-Stick Left" msgstr "R-Stick Gauche" -#: ../plugins/dfinput/cfg-gtk2.c:75 +#: ../plugins/dfinput/cfg-gtk.c:75 msgid "R-Stick Down" msgstr "R-Stick Bas" -#: ../plugins/dfinput/cfg-gtk2.c:76 +#: ../plugins/dfinput/cfg-gtk.c:76 msgid "R-Stick Up" msgstr "R-Stick Haut" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Centered" msgstr "Centré" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Up" msgstr "Haut" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Right" msgstr "Droite" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Rightup" msgstr "Droite-haut" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Down" msgstr "Bas" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Rightdown" msgstr "Droite-bas" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Left" msgstr "Gauche" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Leftup" msgstr "Gauche-haut" -#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +#: ../plugins/dfinput/cfg-gtk.c:104 ../plugins/dfinput/cfg-gtk.c:143 msgid "Leftdown" msgstr "Gauche-bas" -#: ../plugins/dfinput/cfg-gtk2.c:108 ../plugins/dfinput/cfg-gtk2.c:147 +#: ../plugins/dfinput/cfg-gtk.c:108 ../plugins/dfinput/cfg-gtk.c:147 #, c-format msgid "Joystick: Button %d" msgstr "Joystick : Bouton %d" -#: ../plugins/dfinput/cfg-gtk2.c:112 ../plugins/dfinput/cfg-gtk2.c:151 +#: ../plugins/dfinput/cfg-gtk.c:112 ../plugins/dfinput/cfg-gtk.c:151 #, c-format msgid "Joystick: Axis %d%c" msgstr "Joystick: Axe %d%c" -#: ../plugins/dfinput/cfg-gtk2.c:117 ../plugins/dfinput/cfg-gtk2.c:156 +#: ../plugins/dfinput/cfg-gtk.c:117 ../plugins/dfinput/cfg-gtk.c:156 #, c-format msgid "Joystick: Hat %d %s" msgstr "Joystick: Tête %d %s" -#: ../plugins/dfinput/cfg-gtk2.c:132 ../plugins/dfinput/cfg-gtk2.c:171 +#: ../plugins/dfinput/cfg-gtk.c:132 ../plugins/dfinput/cfg-gtk.c:171 msgid "Keyboard:" msgstr "Clavier :" -#: ../plugins/dfinput/cfg-gtk2.c:136 ../plugins/dfinput/cfg-gtk2.c:175 +#: ../plugins/dfinput/cfg-gtk.c:136 ../plugins/dfinput/cfg-gtk.c:175 msgid "(Not Set)" msgstr "(Non défini)" -#: ../plugins/dfinput/cfg-gtk2.c:575 +#: ../plugins/dfinput/cfg-gtk.c:575 #: ../plugins/dfsound/spucfg-0.1df/dfsound.ui.h:14 #: ../plugins/peopsxgl/gpucfg/peopsxgl.ui.h:77 msgid "None" msgstr "Aucun" -#: ../plugins/dfinput/cfg-gtk2.c:623 +#: ../plugins/dfinput/cfg-gtk.c:623 msgid "Gamepad/Keyboard Input Configuration" msgstr "Configuration clavier/manette" -#: ../plugins/dfinput/cfg-gtk2.c:629 ../plugins/dfinput/cfg-gtk2.c:649 +#: ../plugins/dfinput/cfg-gtk.c:629 ../plugins/dfinput/cfg-gtk.c:649 msgid "Key" msgstr "Touche" -#: ../plugins/dfinput/cfg-gtk2.c:635 ../plugins/dfinput/cfg-gtk2.c:655 +#: ../plugins/dfinput/cfg-gtk.c:635 ../plugins/dfinput/cfg-gtk.c:655 msgid "Button" msgstr "Bouton" diff --git a/po/hu_HU.po b/po/hu_HU.po index 7bc43183..6cf3ba4b 100755 --- a/po/hu_HU.po +++ b/po/hu_HU.po @@ -570,7 +570,7 @@ msgstr "Csalás fájl megnyitása" msgid "PCSXR Cheat Code Files (*.cht)" msgstr "PCSXR csalás kód fájlok (*.cht)" -#: ../gui/Cheat.c:309 ../gui/Gtk2Gui.c:475 ../gui/Gtk2Gui.c:616 +#: ../gui/Cheat.c:309 ../gui/GtkGui.c:475 ../gui/GtkGui.c:616 #: ../win32/gui/WndMain.c:1464 ../win32/gui/WndMain.c:1545 msgid "All Files" msgstr "Minden fájl" @@ -710,91 +710,91 @@ msgstr "Címzés" msgid "Text" msgstr "Szöveg" -#: ../gui/Gtk2Gui.c:139 +#: ../gui/GtkGui.c:139 msgid "Ready" msgstr "Kész" -#: ../gui/Gtk2Gui.c:180 +#: ../gui/GtkGui.c:180 msgid "Emulation Paused." msgstr "Emuláció szüneteltetve." -#: ../gui/Gtk2Gui.c:458 +#: ../gui/GtkGui.c:458 msgid "Select PSX EXE File" msgstr "PSX EXE fájl választás" -#: ../gui/Gtk2Gui.c:471 +#: ../gui/GtkGui.c:471 msgid "PlayStation Executable Files" msgstr "PlayStation futtatható fájlok" -#: ../gui/Gtk2Gui.c:508 +#: ../gui/GtkGui.c:508 msgid "Not a valid PSX file" msgstr "Nem megfelelő PSX fájl" -#: ../gui/Gtk2Gui.c:508 +#: ../gui/GtkGui.c:508 msgid "The file does not appear to be a valid Playstation executable" msgstr "A fájl nem tűnik PlayStation futtatható fájlnak" -#: ../gui/Gtk2Gui.c:537 ../gui/Gtk2Gui.c:692 +#: ../gui/GtkGui.c:537 ../gui/GtkGui.c:692 msgid "CD ROM failed" msgstr "CD ROM hiba" -#: ../gui/Gtk2Gui.c:537 ../gui/Gtk2Gui.c:692 ../win32/gui/WndMain.c:469 +#: ../gui/GtkGui.c:537 ../gui/GtkGui.c:692 ../win32/gui/WndMain.c:469 #: ../win32/gui/WndMain.c:521 ../win32/gui/WndMain.c:590 #, c-format msgid "The CD does not appear to be a valid Playstation CD" msgstr "Úgy tűnik a CD lemez nem PlayStation CD formátum" -#: ../gui/Gtk2Gui.c:548 ../gui/Gtk2Gui.c:703 ../win32/gui/WndMain.c:479 +#: ../gui/GtkGui.c:548 ../gui/GtkGui.c:703 ../win32/gui/WndMain.c:479 #: ../win32/gui/WndMain.c:531 ../win32/gui/WndMain.c:600 #, c-format msgid "Could not load CD-ROM!" msgstr "CD-ROM betöltése sikertelen!" -#: ../gui/Gtk2Gui.c:548 ../gui/Gtk2Gui.c:703 +#: ../gui/GtkGui.c:548 ../gui/GtkGui.c:703 msgid "The CD-ROM could not be loaded" msgstr "CD-ROM nem tölthető be" -#: ../gui/Gtk2Gui.c:562 +#: ../gui/GtkGui.c:562 msgid "Could not run BIOS" msgstr "BIOS nem futtatható" -#: ../gui/Gtk2Gui.c:562 +#: ../gui/GtkGui.c:562 msgid "Running BIOS is not supported with Internal HLE BIOS." msgstr "BIOS használata nem támogatott belső HLE BIOS esetén." -#: ../gui/Gtk2Gui.c:591 +#: ../gui/GtkGui.c:591 msgid "Open PSX Disc Image File" msgstr "PSX lemez képfájl megnyitása" -#: ../gui/Gtk2Gui.c:611 +#: ../gui/GtkGui.c:611 msgid "PSX Image Files (*.bin, *.img, *.mdf, *.iso)" msgstr "PSX képfájlok (*.bin, *.img, *.mdf, *.iso)" -#: ../gui/Gtk2Gui.c:864 +#: ../gui/GtkGui.c:864 #, c-format msgid "Loaded state %s." msgstr "Betöltött állás %s." -#: ../gui/Gtk2Gui.c:867 +#: ../gui/GtkGui.c:867 #, c-format msgid "Error loading state %s!" msgstr "Hiba a mentett állás betöltése közben %s!" -#: ../gui/Gtk2Gui.c:878 +#: ../gui/GtkGui.c:878 #, c-format msgid "Saved state %s." msgstr "Mentett állás %s." -#: ../gui/Gtk2Gui.c:880 +#: ../gui/GtkGui.c:880 #, c-format msgid "Error saving state %s!" msgstr "Hiba az állás mentése közben %s!" -#: ../gui/Gtk2Gui.c:915 ../gui/Gtk2Gui.c:943 +#: ../gui/GtkGui.c:915 ../gui/GtkGui.c:943 msgid "Select State File" msgstr "Állás mentés választás" -#: ../gui/Gtk2Gui.c:986 +#: ../gui/GtkGui.c:986 msgid "Notice" msgstr "Megjegyzés" @@ -1316,181 +1316,181 @@ msgstr "" msgid "32min" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:49 +#: ../plugins/dfinput/cfg-gtk.c:49 msgid "D-Pad Up" msgstr "Digitális FEL" -#: ../plugins/dfinput/cfg-gtk2.c:50 +#: ../plugins/dfinput/cfg-gtk.c:50 msgid "D-Pad Down" msgstr "Digitális LE" -#: ../plugins/dfinput/cfg-gtk2.c:51 +#: ../plugins/dfinput/cfg-gtk.c:51 msgid "D-Pad Left" msgstr "Digitális BALRA" -#: ../plugins/dfinput/cfg-gtk2.c:52 +#: ../plugins/dfinput/cfg-gtk.c:52 msgid "D-Pad Right" msgstr "Digitális JOBBRA" -#: ../plugins/dfinput/cfg-gtk2.c:53 +#: ../plugins/dfinput/cfg-gtk.c:53 msgid "Cross" msgstr "KERESZT" -#: ../plugins/dfinput/cfg-gtk2.c:54 +#: ../plugins/dfinput/cfg-gtk.c:54 msgid "Circle" msgstr "KÖR" -#: ../plugins/dfinput/cfg-gtk2.c:55 +#: ../plugins/dfinput/cfg-gtk.c:55 msgid "Square" msgstr "NÉGYSZÖG" -#: ../plugins/dfinput/cfg-gtk2.c:56 +#: ../plugins/dfinput/cfg-gtk.c:56 msgid "Triangle" msgstr "HÁROMSZÖG" -#: ../plugins/dfinput/cfg-gtk2.c:57 +#: ../plugins/dfinput/cfg-gtk.c:57 msgid "L1" msgstr "L1" -#: ../plugins/dfinput/cfg-gtk2.c:58 +#: ../plugins/dfinput/cfg-gtk.c:58 msgid "R1" msgstr "R1" -#: ../plugins/dfinput/cfg-gtk2.c:59 +#: ../plugins/dfinput/cfg-gtk.c:59 msgid "L2" msgstr "L2" -#: ../plugins/dfinput/cfg-gtk2.c:60 +#: ../plugins/dfinput/cfg-gtk.c:60 msgid "R2" msgstr "R2" -#: ../plugins/dfinput/cfg-gtk2.c:61 +#: ../plugins/dfinput/cfg-gtk.c:61 msgid "Select" msgstr "Select" -#: ../plugins/dfinput/cfg-gtk2.c:62 +#: ../plugins/dfinput/cfg-gtk.c:62 msgid "Start" msgstr "Start" -#: ../plugins/dfinput/cfg-gtk2.c:63 +#: ../plugins/dfinput/cfg-gtk.c:63 msgid "L3" msgstr "L3" -#: ../plugins/dfinput/cfg-gtk2.c:64 +#: ../plugins/dfinput/cfg-gtk.c:64 msgid "R3" msgstr "R3" -#: ../plugins/dfinput/cfg-gtk2.c:65 +#: ../plugins/dfinput/cfg-gtk.c:65 #, fuzzy msgid "Analog" msgstr "Analóg irányító" -#: ../plugins/dfinput/cfg-gtk2.c:69 +#: ../plugins/dfinput/cfg-gtk.c:69 msgid "L-Stick Right" msgstr "Bal kar jobbra" -#: ../plugins/dfinput/cfg-gtk2.c:70 +#: ../plugins/dfinput/cfg-gtk.c:70 msgid "L-Stick Left" msgstr "Bal kar jobbra" -#: ../plugins/dfinput/cfg-gtk2.c:71 +#: ../plugins/dfinput/cfg-gtk.c:71 msgid "L-Stick Down" msgstr "Bal kar le" -#: ../plugins/dfinput/cfg-gtk2.c:72 +#: ../plugins/dfinput/cfg-gtk.c:72 msgid "L-Stick Up" msgstr "Bal kar fel" -#: ../plugins/dfinput/cfg-gtk2.c:73 +#: ../plugins/dfinput/cfg-gtk.c:73 msgid "R-Stick Right" msgstr "Jobb kar jobbra" -#: ../plugins/dfinput/cfg-gtk2.c:74 +#: ../plugins/dfinput/cfg-gtk.c:74 msgid "R-Stick Left" msgstr "Jobb kar balra" -#: ../plugins/dfinput/cfg-gtk2.c:75 +#: ../plugins/dfinput/cfg-gtk.c:75 msgid "R-Stick Down" msgstr "Jobb kar le" -#: ../plugins/dfinput/cfg-gtk2.c:76 +#: ../plugins/dfinput/cfg-gtk.c:76 msgid "R-Stick Up" msgstr "Jobb kar fel" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Centered" msgstr "Középen" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Up" msgstr "Fel" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Right" msgstr "Jobbra" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Rightup" msgstr "Jobbra fel" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Down" msgstr "Le" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Rightdown" msgstr "Jobbra le" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Left" msgstr "Balra" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Leftup" msgstr "Balra fel" -#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +#: ../plugins/dfinput/cfg-gtk.c:104 ../plugins/dfinput/cfg-gtk.c:143 msgid "Leftdown" msgstr "Balra le" -#: ../plugins/dfinput/cfg-gtk2.c:108 ../plugins/dfinput/cfg-gtk2.c:147 +#: ../plugins/dfinput/cfg-gtk.c:108 ../plugins/dfinput/cfg-gtk.c:147 #, c-format msgid "Joystick: Button %d" msgstr "Joystick: %d gomb" -#: ../plugins/dfinput/cfg-gtk2.c:112 ../plugins/dfinput/cfg-gtk2.c:151 +#: ../plugins/dfinput/cfg-gtk.c:112 ../plugins/dfinput/cfg-gtk.c:151 #, c-format msgid "Joystick: Axis %d%c" msgstr "Joystick: %d%c irány" -#: ../plugins/dfinput/cfg-gtk2.c:117 ../plugins/dfinput/cfg-gtk2.c:156 +#: ../plugins/dfinput/cfg-gtk.c:117 ../plugins/dfinput/cfg-gtk.c:156 #, c-format msgid "Joystick: Hat %d %s" msgstr "Joystick: %d %s hat" -#: ../plugins/dfinput/cfg-gtk2.c:132 ../plugins/dfinput/cfg-gtk2.c:171 +#: ../plugins/dfinput/cfg-gtk.c:132 ../plugins/dfinput/cfg-gtk.c:171 msgid "Keyboard:" msgstr "Billentyűzet:" -#: ../plugins/dfinput/cfg-gtk2.c:136 ../plugins/dfinput/cfg-gtk2.c:175 +#: ../plugins/dfinput/cfg-gtk.c:136 ../plugins/dfinput/cfg-gtk.c:175 msgid "(Not Set)" msgstr "(Nincs beállítva)" -#: ../plugins/dfinput/cfg-gtk2.c:575 +#: ../plugins/dfinput/cfg-gtk.c:575 #: ../plugins/dfsound/spucfg-0.1df/dfsound.ui.h:14 #: ../plugins/peopsxgl/gpucfg/peopsxgl.ui.h:77 msgid "None" msgstr "Nincs" -#: ../plugins/dfinput/cfg-gtk2.c:623 +#: ../plugins/dfinput/cfg-gtk.c:623 msgid "Gamepad/Keyboard Input Configuration" msgstr "Játékirányító/Billentyűzet bemeneti beállítás" -#: ../plugins/dfinput/cfg-gtk2.c:629 ../plugins/dfinput/cfg-gtk2.c:649 +#: ../plugins/dfinput/cfg-gtk.c:629 ../plugins/dfinput/cfg-gtk.c:649 msgid "Key" msgstr "Billentyű" -#: ../plugins/dfinput/cfg-gtk2.c:635 ../plugins/dfinput/cfg-gtk2.c:655 +#: ../plugins/dfinput/cfg-gtk.c:635 ../plugins/dfinput/cfg-gtk.c:655 msgid "Button" msgstr "Gomb" diff --git a/po/it.po b/po/it.po index 7093e52d..634ff466 100755 --- a/po/it.po +++ b/po/it.po @@ -574,7 +574,7 @@ msgstr "Apri il file del cheat" msgid "PCSXR Cheat Code Files (*.cht)" msgstr "File cheat di PCSXR (*.cht)" -#: ../gui/Cheat.c:309 ../gui/Gtk2Gui.c:475 ../gui/Gtk2Gui.c:616 +#: ../gui/Cheat.c:309 ../gui/GtkGui.c:475 ../gui/GtkGui.c:616 #: ../win32/gui/WndMain.c:1464 ../win32/gui/WndMain.c:1545 msgid "All Files" msgstr "Tutti i file" @@ -720,91 +720,91 @@ msgstr "Indirizzo:" msgid "Text" msgstr "Strutture" -#: ../gui/Gtk2Gui.c:139 +#: ../gui/GtkGui.c:139 msgid "Ready" msgstr "Pronto" -#: ../gui/Gtk2Gui.c:180 +#: ../gui/GtkGui.c:180 msgid "Emulation Paused." msgstr "L'emulazione è stata messa in pausa." -#: ../gui/Gtk2Gui.c:458 +#: ../gui/GtkGui.c:458 msgid "Select PSX EXE File" msgstr "Seleziona un file EXE della PSX" -#: ../gui/Gtk2Gui.c:471 +#: ../gui/GtkGui.c:471 msgid "PlayStation Executable Files" msgstr "File eseguibili della PlayStation" -#: ../gui/Gtk2Gui.c:508 +#: ../gui/GtkGui.c:508 msgid "Not a valid PSX file" msgstr "Non è un file valido della PSX" -#: ../gui/Gtk2Gui.c:508 +#: ../gui/GtkGui.c:508 msgid "The file does not appear to be a valid Playstation executable" msgstr "Il file non sembra essere un eseguibile valido della Playstation" -#: ../gui/Gtk2Gui.c:537 ../gui/Gtk2Gui.c:692 +#: ../gui/GtkGui.c:537 ../gui/GtkGui.c:692 msgid "CD ROM failed" msgstr "Si è verificato un problema con il CD ROM" -#: ../gui/Gtk2Gui.c:537 ../gui/Gtk2Gui.c:692 ../win32/gui/WndMain.c:469 +#: ../gui/GtkGui.c:537 ../gui/GtkGui.c:692 ../win32/gui/WndMain.c:469 #: ../win32/gui/WndMain.c:521 ../win32/gui/WndMain.c:590 #, c-format msgid "The CD does not appear to be a valid Playstation CD" msgstr "Il CD inserito non sembra essere un valido CD della Playstation" -#: ../gui/Gtk2Gui.c:548 ../gui/Gtk2Gui.c:703 ../win32/gui/WndMain.c:479 +#: ../gui/GtkGui.c:548 ../gui/GtkGui.c:703 ../win32/gui/WndMain.c:479 #: ../win32/gui/WndMain.c:531 ../win32/gui/WndMain.c:600 #, c-format msgid "Could not load CD-ROM!" msgstr "Impossibile caricare il CD-ROM!" -#: ../gui/Gtk2Gui.c:548 ../gui/Gtk2Gui.c:703 +#: ../gui/GtkGui.c:548 ../gui/GtkGui.c:703 msgid "The CD-ROM could not be loaded" msgstr "Impossibile caricare il CD-ROM" -#: ../gui/Gtk2Gui.c:562 +#: ../gui/GtkGui.c:562 msgid "Could not run BIOS" msgstr "Impossibile avviare il BIOS" -#: ../gui/Gtk2Gui.c:562 +#: ../gui/GtkGui.c:562 msgid "Running BIOS is not supported with Internal HLE BIOS." msgstr "L'avvio del BIOS non è supportato con il BIOS HLE interno." -#: ../gui/Gtk2Gui.c:591 +#: ../gui/GtkGui.c:591 msgid "Open PSX Disc Image File" msgstr "Apri il file immagine del disco PSX" -#: ../gui/Gtk2Gui.c:611 +#: ../gui/GtkGui.c:611 msgid "PSX Image Files (*.bin, *.img, *.mdf, *.iso)" msgstr "File immagine PSX (*.bin, *.img, *.mdf, *.iso)" -#: ../gui/Gtk2Gui.c:864 +#: ../gui/GtkGui.c:864 #, c-format msgid "Loaded state %s." msgstr "È stato caricato lo stato %s." -#: ../gui/Gtk2Gui.c:867 +#: ../gui/GtkGui.c:867 #, c-format msgid "Error loading state %s!" msgstr "Si è verificato un errore durante il caricamento dello stato %s!" -#: ../gui/Gtk2Gui.c:878 +#: ../gui/GtkGui.c:878 #, c-format msgid "Saved state %s." msgstr "È stato salvato lo stato %s." -#: ../gui/Gtk2Gui.c:880 +#: ../gui/GtkGui.c:880 #, c-format msgid "Error saving state %s!" msgstr "Si è verificato un errore durante il salvataggio dello stato %s!" -#: ../gui/Gtk2Gui.c:915 ../gui/Gtk2Gui.c:943 +#: ../gui/GtkGui.c:915 ../gui/GtkGui.c:943 msgid "Select State File" msgstr "Seleziona il file dello stato" -#: ../gui/Gtk2Gui.c:986 +#: ../gui/GtkGui.c:986 msgid "Notice" msgstr "Avviso" @@ -1342,183 +1342,183 @@ msgstr "" msgid "32min" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:49 +#: ../plugins/dfinput/cfg-gtk.c:49 msgid "D-Pad Up" msgstr "D-Pad Su" -#: ../plugins/dfinput/cfg-gtk2.c:50 +#: ../plugins/dfinput/cfg-gtk.c:50 msgid "D-Pad Down" msgstr "D-Pad Giù" -#: ../plugins/dfinput/cfg-gtk2.c:51 +#: ../plugins/dfinput/cfg-gtk.c:51 msgid "D-Pad Left" msgstr "D-Pad Sinistra" -#: ../plugins/dfinput/cfg-gtk2.c:52 +#: ../plugins/dfinput/cfg-gtk.c:52 msgid "D-Pad Right" msgstr "D-Pad Destra" -#: ../plugins/dfinput/cfg-gtk2.c:53 +#: ../plugins/dfinput/cfg-gtk.c:53 msgid "Cross" msgstr "Croce" -#: ../plugins/dfinput/cfg-gtk2.c:54 +#: ../plugins/dfinput/cfg-gtk.c:54 msgid "Circle" msgstr "Cerchio" -#: ../plugins/dfinput/cfg-gtk2.c:55 +#: ../plugins/dfinput/cfg-gtk.c:55 msgid "Square" msgstr "Quadrato" -#: ../plugins/dfinput/cfg-gtk2.c:56 +#: ../plugins/dfinput/cfg-gtk.c:56 msgid "Triangle" msgstr "Triangolo" -#: ../plugins/dfinput/cfg-gtk2.c:57 +#: ../plugins/dfinput/cfg-gtk.c:57 msgid "L1" msgstr "L1" -#: ../plugins/dfinput/cfg-gtk2.c:58 +#: ../plugins/dfinput/cfg-gtk.c:58 msgid "R1" msgstr "R1" -#: ../plugins/dfinput/cfg-gtk2.c:59 +#: ../plugins/dfinput/cfg-gtk.c:59 msgid "L2" msgstr "L2" -#: ../plugins/dfinput/cfg-gtk2.c:60 +#: ../plugins/dfinput/cfg-gtk.c:60 msgid "R2" msgstr "R2" -#: ../plugins/dfinput/cfg-gtk2.c:61 +#: ../plugins/dfinput/cfg-gtk.c:61 msgid "Select" msgstr "Tasto Select" -#: ../plugins/dfinput/cfg-gtk2.c:62 +#: ../plugins/dfinput/cfg-gtk.c:62 msgid "Start" msgstr "Tasto Start" -#: ../plugins/dfinput/cfg-gtk2.c:63 +#: ../plugins/dfinput/cfg-gtk.c:63 msgid "L3" msgstr "L3" -#: ../plugins/dfinput/cfg-gtk2.c:64 +#: ../plugins/dfinput/cfg-gtk.c:64 msgid "R3" msgstr "R3" -#: ../plugins/dfinput/cfg-gtk2.c:65 +#: ../plugins/dfinput/cfg-gtk.c:65 #, fuzzy msgid "Analog" msgstr "" "Pad digitale\n" "Pad analogico" -#: ../plugins/dfinput/cfg-gtk2.c:69 +#: ../plugins/dfinput/cfg-gtk.c:69 msgid "L-Stick Right" msgstr "L-Stick Destra" -#: ../plugins/dfinput/cfg-gtk2.c:70 +#: ../plugins/dfinput/cfg-gtk.c:70 msgid "L-Stick Left" msgstr "L-Stick Sinistra" -#: ../plugins/dfinput/cfg-gtk2.c:71 +#: ../plugins/dfinput/cfg-gtk.c:71 msgid "L-Stick Down" msgstr "L-Stick Giù" -#: ../plugins/dfinput/cfg-gtk2.c:72 +#: ../plugins/dfinput/cfg-gtk.c:72 msgid "L-Stick Up" msgstr "L-Stick Su" -#: ../plugins/dfinput/cfg-gtk2.c:73 +#: ../plugins/dfinput/cfg-gtk.c:73 msgid "R-Stick Right" msgstr "R-Stick Destra" -#: ../plugins/dfinput/cfg-gtk2.c:74 +#: ../plugins/dfinput/cfg-gtk.c:74 msgid "R-Stick Left" msgstr "R-Stick Sinistra" -#: ../plugins/dfinput/cfg-gtk2.c:75 +#: ../plugins/dfinput/cfg-gtk.c:75 msgid "R-Stick Down" msgstr "R-Stick Giù" -#: ../plugins/dfinput/cfg-gtk2.c:76 +#: ../plugins/dfinput/cfg-gtk.c:76 msgid "R-Stick Up" msgstr "R-Stick Su" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Centered" msgstr "Centrato" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Up" msgstr "Su" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Right" msgstr "Destra" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Rightup" msgstr "In alto a destra" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Down" msgstr "Giù" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Rightdown" msgstr "In basso a destra" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Left" msgstr "Sinistra" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Leftup" msgstr "In alto a sinistra" -#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +#: ../plugins/dfinput/cfg-gtk.c:104 ../plugins/dfinput/cfg-gtk.c:143 msgid "Leftdown" msgstr "In basso a sinistra" -#: ../plugins/dfinput/cfg-gtk2.c:108 ../plugins/dfinput/cfg-gtk2.c:147 +#: ../plugins/dfinput/cfg-gtk.c:108 ../plugins/dfinput/cfg-gtk.c:147 #, c-format msgid "Joystick: Button %d" msgstr "Joystick: Pulsante %d" -#: ../plugins/dfinput/cfg-gtk2.c:112 ../plugins/dfinput/cfg-gtk2.c:151 +#: ../plugins/dfinput/cfg-gtk.c:112 ../plugins/dfinput/cfg-gtk.c:151 #, c-format msgid "Joystick: Axis %d%c" msgstr "Joystick: Asse %d%c" -#: ../plugins/dfinput/cfg-gtk2.c:117 ../plugins/dfinput/cfg-gtk2.c:156 +#: ../plugins/dfinput/cfg-gtk.c:117 ../plugins/dfinput/cfg-gtk.c:156 #, c-format msgid "Joystick: Hat %d %s" msgstr "Joystick: hat %d %s" -#: ../plugins/dfinput/cfg-gtk2.c:132 ../plugins/dfinput/cfg-gtk2.c:171 +#: ../plugins/dfinput/cfg-gtk.c:132 ../plugins/dfinput/cfg-gtk.c:171 msgid "Keyboard:" msgstr "Tastiera:" -#: ../plugins/dfinput/cfg-gtk2.c:136 ../plugins/dfinput/cfg-gtk2.c:175 +#: ../plugins/dfinput/cfg-gtk.c:136 ../plugins/dfinput/cfg-gtk.c:175 msgid "(Not Set)" msgstr "(Nessuna impostazione)" -#: ../plugins/dfinput/cfg-gtk2.c:575 +#: ../plugins/dfinput/cfg-gtk.c:575 #: ../plugins/dfsound/spucfg-0.1df/dfsound.ui.h:14 #: ../plugins/peopsxgl/gpucfg/peopsxgl.ui.h:77 msgid "None" msgstr "Nessuno" -#: ../plugins/dfinput/cfg-gtk2.c:623 +#: ../plugins/dfinput/cfg-gtk.c:623 msgid "Gamepad/Keyboard Input Configuration" msgstr "Configurazione input del gamepad/tastiera" -#: ../plugins/dfinput/cfg-gtk2.c:629 ../plugins/dfinput/cfg-gtk2.c:649 +#: ../plugins/dfinput/cfg-gtk.c:629 ../plugins/dfinput/cfg-gtk.c:649 msgid "Key" msgstr "Tasto" -#: ../plugins/dfinput/cfg-gtk2.c:635 ../plugins/dfinput/cfg-gtk2.c:655 +#: ../plugins/dfinput/cfg-gtk.c:635 ../plugins/dfinput/cfg-gtk.c:655 msgid "Button" msgstr "Pulsante" diff --git a/po/pcsxr.pot b/po/pcsxr.pot index 5652a754..89eb7b0f 100755 --- a/po/pcsxr.pot +++ b/po/pcsxr.pot @@ -550,7 +550,7 @@ msgstr "" msgid "PCSXR Cheat Code Files (*.cht)" msgstr "" -#: ../gui/Cheat.c:309 ../gui/Gtk2Gui.c:475 ../gui/Gtk2Gui.c:616 +#: ../gui/Cheat.c:309 ../gui/GtkGui.c:475 ../gui/GtkGui.c:616 #: ../win32/gui/WndMain.c:1464 ../win32/gui/WndMain.c:1545 msgid "All Files" msgstr "" @@ -690,91 +690,91 @@ msgstr "" msgid "Text" msgstr "" -#: ../gui/Gtk2Gui.c:139 +#: ../gui/GtkGui.c:139 msgid "Ready" msgstr "" -#: ../gui/Gtk2Gui.c:180 +#: ../gui/GtkGui.c:180 msgid "Emulation Paused." msgstr "" -#: ../gui/Gtk2Gui.c:458 +#: ../gui/GtkGui.c:458 msgid "Select PSX EXE File" msgstr "" -#: ../gui/Gtk2Gui.c:471 +#: ../gui/GtkGui.c:471 msgid "PlayStation Executable Files" msgstr "" -#: ../gui/Gtk2Gui.c:508 +#: ../gui/GtkGui.c:508 msgid "Not a valid PSX file" msgstr "" -#: ../gui/Gtk2Gui.c:508 +#: ../gui/GtkGui.c:508 msgid "The file does not appear to be a valid Playstation executable" msgstr "" -#: ../gui/Gtk2Gui.c:537 ../gui/Gtk2Gui.c:692 +#: ../gui/GtkGui.c:537 ../gui/GtkGui.c:692 msgid "CD ROM failed" msgstr "" -#: ../gui/Gtk2Gui.c:537 ../gui/Gtk2Gui.c:692 ../win32/gui/WndMain.c:469 +#: ../gui/GtkGui.c:537 ../gui/GtkGui.c:692 ../win32/gui/WndMain.c:469 #: ../win32/gui/WndMain.c:521 ../win32/gui/WndMain.c:590 #, c-format msgid "The CD does not appear to be a valid Playstation CD" msgstr "" -#: ../gui/Gtk2Gui.c:548 ../gui/Gtk2Gui.c:703 ../win32/gui/WndMain.c:479 +#: ../gui/GtkGui.c:548 ../gui/GtkGui.c:703 ../win32/gui/WndMain.c:479 #: ../win32/gui/WndMain.c:531 ../win32/gui/WndMain.c:600 #, c-format msgid "Could not load CD-ROM!" msgstr "" -#: ../gui/Gtk2Gui.c:548 ../gui/Gtk2Gui.c:703 +#: ../gui/GtkGui.c:548 ../gui/GtkGui.c:703 msgid "The CD-ROM could not be loaded" msgstr "" -#: ../gui/Gtk2Gui.c:562 +#: ../gui/GtkGui.c:562 msgid "Could not run BIOS" msgstr "" -#: ../gui/Gtk2Gui.c:562 +#: ../gui/GtkGui.c:562 msgid "Running BIOS is not supported with Internal HLE BIOS." msgstr "" -#: ../gui/Gtk2Gui.c:591 +#: ../gui/GtkGui.c:591 msgid "Open PSX Disc Image File" msgstr "" -#: ../gui/Gtk2Gui.c:611 +#: ../gui/GtkGui.c:611 msgid "PSX Image Files (*.bin, *.img, *.mdf, *.iso)" msgstr "" -#: ../gui/Gtk2Gui.c:864 +#: ../gui/GtkGui.c:864 #, c-format msgid "Loaded state %s." msgstr "" -#: ../gui/Gtk2Gui.c:867 +#: ../gui/GtkGui.c:867 #, c-format msgid "Error loading state %s!" msgstr "" -#: ../gui/Gtk2Gui.c:878 +#: ../gui/GtkGui.c:878 #, c-format msgid "Saved state %s." msgstr "" -#: ../gui/Gtk2Gui.c:880 +#: ../gui/GtkGui.c:880 #, c-format msgid "Error saving state %s!" msgstr "" -#: ../gui/Gtk2Gui.c:915 ../gui/Gtk2Gui.c:943 +#: ../gui/GtkGui.c:915 ../gui/GtkGui.c:943 msgid "Select State File" msgstr "" -#: ../gui/Gtk2Gui.c:986 +#: ../gui/GtkGui.c:986 msgid "Notice" msgstr "" @@ -1272,180 +1272,180 @@ msgstr "" msgid "32min" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:49 +#: ../plugins/dfinput/cfg-gtk.c:49 msgid "D-Pad Up" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:50 +#: ../plugins/dfinput/cfg-gtk.c:50 msgid "D-Pad Down" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:51 +#: ../plugins/dfinput/cfg-gtk.c:51 msgid "D-Pad Left" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:52 +#: ../plugins/dfinput/cfg-gtk.c:52 msgid "D-Pad Right" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:53 +#: ../plugins/dfinput/cfg-gtk.c:53 msgid "Cross" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:54 +#: ../plugins/dfinput/cfg-gtk.c:54 msgid "Circle" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:55 +#: ../plugins/dfinput/cfg-gtk.c:55 msgid "Square" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:56 +#: ../plugins/dfinput/cfg-gtk.c:56 msgid "Triangle" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:57 +#: ../plugins/dfinput/cfg-gtk.c:57 msgid "L1" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:58 +#: ../plugins/dfinput/cfg-gtk.c:58 msgid "R1" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:59 +#: ../plugins/dfinput/cfg-gtk.c:59 msgid "L2" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:60 +#: ../plugins/dfinput/cfg-gtk.c:60 msgid "R2" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:61 +#: ../plugins/dfinput/cfg-gtk.c:61 msgid "Select" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:62 +#: ../plugins/dfinput/cfg-gtk.c:62 msgid "Start" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:63 +#: ../plugins/dfinput/cfg-gtk.c:63 msgid "L3" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:64 +#: ../plugins/dfinput/cfg-gtk.c:64 msgid "R3" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:65 +#: ../plugins/dfinput/cfg-gtk.c:65 msgid "Analog" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:69 +#: ../plugins/dfinput/cfg-gtk.c:69 msgid "L-Stick Right" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:70 +#: ../plugins/dfinput/cfg-gtk.c:70 msgid "L-Stick Left" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:71 +#: ../plugins/dfinput/cfg-gtk.c:71 msgid "L-Stick Down" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:72 +#: ../plugins/dfinput/cfg-gtk.c:72 msgid "L-Stick Up" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:73 +#: ../plugins/dfinput/cfg-gtk.c:73 msgid "R-Stick Right" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:74 +#: ../plugins/dfinput/cfg-gtk.c:74 msgid "R-Stick Left" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:75 +#: ../plugins/dfinput/cfg-gtk.c:75 msgid "R-Stick Down" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:76 +#: ../plugins/dfinput/cfg-gtk.c:76 msgid "R-Stick Up" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Centered" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Up" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Right" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Rightup" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Down" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Rightdown" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Left" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Leftup" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +#: ../plugins/dfinput/cfg-gtk.c:104 ../plugins/dfinput/cfg-gtk.c:143 msgid "Leftdown" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:108 ../plugins/dfinput/cfg-gtk2.c:147 +#: ../plugins/dfinput/cfg-gtk.c:108 ../plugins/dfinput/cfg-gtk.c:147 #, c-format msgid "Joystick: Button %d" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:112 ../plugins/dfinput/cfg-gtk2.c:151 +#: ../plugins/dfinput/cfg-gtk.c:112 ../plugins/dfinput/cfg-gtk.c:151 #, c-format msgid "Joystick: Axis %d%c" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:117 ../plugins/dfinput/cfg-gtk2.c:156 +#: ../plugins/dfinput/cfg-gtk.c:117 ../plugins/dfinput/cfg-gtk.c:156 #, c-format msgid "Joystick: Hat %d %s" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:132 ../plugins/dfinput/cfg-gtk2.c:171 +#: ../plugins/dfinput/cfg-gtk.c:132 ../plugins/dfinput/cfg-gtk.c:171 msgid "Keyboard:" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:136 ../plugins/dfinput/cfg-gtk2.c:175 +#: ../plugins/dfinput/cfg-gtk.c:136 ../plugins/dfinput/cfg-gtk.c:175 msgid "(Not Set)" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:575 +#: ../plugins/dfinput/cfg-gtk.c:575 #: ../plugins/dfsound/spucfg-0.1df/dfsound.ui.h:14 #: ../plugins/peopsxgl/gpucfg/peopsxgl.ui.h:77 msgid "None" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:623 +#: ../plugins/dfinput/cfg-gtk.c:623 msgid "Gamepad/Keyboard Input Configuration" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:629 ../plugins/dfinput/cfg-gtk2.c:649 +#: ../plugins/dfinput/cfg-gtk.c:629 ../plugins/dfinput/cfg-gtk.c:649 msgid "Key" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:635 ../plugins/dfinput/cfg-gtk2.c:655 +#: ../plugins/dfinput/cfg-gtk.c:635 ../plugins/dfinput/cfg-gtk.c:655 msgid "Button" msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po index 82e80d0a..052d05ce 100755 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -572,7 +572,7 @@ msgstr "Abrir arquivo de trapaça" msgid "PCSXR Cheat Code Files (*.cht)" msgstr "Arquivos de trapaça do PCSXR (*.cht)" -#: ../gui/Cheat.c:309 ../gui/Gtk2Gui.c:475 ../gui/Gtk2Gui.c:616 +#: ../gui/Cheat.c:309 ../gui/GtkGui.c:475 ../gui/GtkGui.c:616 #: ../win32/gui/WndMain.c:1464 ../win32/gui/WndMain.c:1545 msgid "All Files" msgstr "Todos os arquivos" @@ -718,91 +718,91 @@ msgstr "Endereço:" msgid "Text" msgstr "Texturas" -#: ../gui/Gtk2Gui.c:139 +#: ../gui/GtkGui.c:139 msgid "Ready" msgstr "" -#: ../gui/Gtk2Gui.c:180 +#: ../gui/GtkGui.c:180 msgid "Emulation Paused." msgstr "" -#: ../gui/Gtk2Gui.c:458 +#: ../gui/GtkGui.c:458 msgid "Select PSX EXE File" msgstr "Selecione o arquivo executável de PSX" -#: ../gui/Gtk2Gui.c:471 +#: ../gui/GtkGui.c:471 msgid "PlayStation Executable Files" msgstr "Arquivos executáveis do PlayStation" -#: ../gui/Gtk2Gui.c:508 +#: ../gui/GtkGui.c:508 msgid "Not a valid PSX file" msgstr "Não é um arquivo válido de PSX" -#: ../gui/Gtk2Gui.c:508 +#: ../gui/GtkGui.c:508 msgid "The file does not appear to be a valid Playstation executable" msgstr "Esse arquivo não parece ser um executável válido de PlayStation!" -#: ../gui/Gtk2Gui.c:537 ../gui/Gtk2Gui.c:692 +#: ../gui/GtkGui.c:537 ../gui/GtkGui.c:692 msgid "CD ROM failed" msgstr "CDROM falhou" -#: ../gui/Gtk2Gui.c:537 ../gui/Gtk2Gui.c:692 ../win32/gui/WndMain.c:469 +#: ../gui/GtkGui.c:537 ../gui/GtkGui.c:692 ../win32/gui/WndMain.c:469 #: ../win32/gui/WndMain.c:521 ../win32/gui/WndMain.c:590 #, c-format msgid "The CD does not appear to be a valid Playstation CD" msgstr "Esse CD não parece ser um CD de PlayStation!" -#: ../gui/Gtk2Gui.c:548 ../gui/Gtk2Gui.c:703 ../win32/gui/WndMain.c:479 +#: ../gui/GtkGui.c:548 ../gui/GtkGui.c:703 ../win32/gui/WndMain.c:479 #: ../win32/gui/WndMain.c:531 ../win32/gui/WndMain.c:600 #, c-format msgid "Could not load CD-ROM!" msgstr "Não pôde carregar o CDROM!" -#: ../gui/Gtk2Gui.c:548 ../gui/Gtk2Gui.c:703 +#: ../gui/GtkGui.c:548 ../gui/GtkGui.c:703 msgid "The CD-ROM could not be loaded" msgstr "" -#: ../gui/Gtk2Gui.c:562 +#: ../gui/GtkGui.c:562 msgid "Could not run BIOS" msgstr "Não conseguiu iniciar a BIOS" -#: ../gui/Gtk2Gui.c:562 +#: ../gui/GtkGui.c:562 msgid "Running BIOS is not supported with Internal HLE BIOS." msgstr "Iniciar pela BIOS não é suportado com a BIOS HLE interno." -#: ../gui/Gtk2Gui.c:591 +#: ../gui/GtkGui.c:591 msgid "Open PSX Disc Image File" msgstr "Abrir arquivo de imagem de CD de PSX" -#: ../gui/Gtk2Gui.c:611 +#: ../gui/GtkGui.c:611 msgid "PSX Image Files (*.bin, *.img, *.mdf, *.iso)" msgstr "Arquivo de imagens de CD de PSX (*.bin, *.img, *.mdf, *.iso)" -#: ../gui/Gtk2Gui.c:864 +#: ../gui/GtkGui.c:864 #, c-format msgid "Loaded state %s." msgstr "Arquivo de estado \"%s\" carregado." -#: ../gui/Gtk2Gui.c:867 +#: ../gui/GtkGui.c:867 #, c-format msgid "Error loading state %s!" msgstr "Erro ao carregar o arquivo de estado \"%s\"!" -#: ../gui/Gtk2Gui.c:878 +#: ../gui/GtkGui.c:878 #, c-format msgid "Saved state %s." msgstr "Arquivo de estado \"%s\" salvo." -#: ../gui/Gtk2Gui.c:880 +#: ../gui/GtkGui.c:880 #, c-format msgid "Error saving state %s!" msgstr "Erro ao salvar o arquivo de estado \"%s\"!" -#: ../gui/Gtk2Gui.c:915 ../gui/Gtk2Gui.c:943 +#: ../gui/GtkGui.c:915 ../gui/GtkGui.c:943 msgid "Select State File" msgstr "Selecione o arquivo de estado" -#: ../gui/Gtk2Gui.c:986 +#: ../gui/GtkGui.c:986 msgid "Notice" msgstr "Aviso" @@ -1314,180 +1314,180 @@ msgstr "" msgid "32min" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:49 +#: ../plugins/dfinput/cfg-gtk.c:49 msgid "D-Pad Up" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:50 +#: ../plugins/dfinput/cfg-gtk.c:50 msgid "D-Pad Down" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:51 +#: ../plugins/dfinput/cfg-gtk.c:51 msgid "D-Pad Left" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:52 +#: ../plugins/dfinput/cfg-gtk.c:52 msgid "D-Pad Right" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:53 +#: ../plugins/dfinput/cfg-gtk.c:53 msgid "Cross" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:54 +#: ../plugins/dfinput/cfg-gtk.c:54 msgid "Circle" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:55 +#: ../plugins/dfinput/cfg-gtk.c:55 msgid "Square" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:56 +#: ../plugins/dfinput/cfg-gtk.c:56 msgid "Triangle" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:57 +#: ../plugins/dfinput/cfg-gtk.c:57 msgid "L1" msgstr "L1" -#: ../plugins/dfinput/cfg-gtk2.c:58 +#: ../plugins/dfinput/cfg-gtk.c:58 msgid "R1" msgstr "R1" -#: ../plugins/dfinput/cfg-gtk2.c:59 +#: ../plugins/dfinput/cfg-gtk.c:59 msgid "L2" msgstr "L2" -#: ../plugins/dfinput/cfg-gtk2.c:60 +#: ../plugins/dfinput/cfg-gtk.c:60 msgid "R2" msgstr "R2" -#: ../plugins/dfinput/cfg-gtk2.c:61 +#: ../plugins/dfinput/cfg-gtk.c:61 msgid "Select" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:62 +#: ../plugins/dfinput/cfg-gtk.c:62 msgid "Start" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:63 +#: ../plugins/dfinput/cfg-gtk.c:63 msgid "L3" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:64 +#: ../plugins/dfinput/cfg-gtk.c:64 msgid "R3" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:65 +#: ../plugins/dfinput/cfg-gtk.c:65 msgid "Analog" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:69 +#: ../plugins/dfinput/cfg-gtk.c:69 msgid "L-Stick Right" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:70 +#: ../plugins/dfinput/cfg-gtk.c:70 msgid "L-Stick Left" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:71 +#: ../plugins/dfinput/cfg-gtk.c:71 msgid "L-Stick Down" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:72 +#: ../plugins/dfinput/cfg-gtk.c:72 msgid "L-Stick Up" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:73 +#: ../plugins/dfinput/cfg-gtk.c:73 msgid "R-Stick Right" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:74 +#: ../plugins/dfinput/cfg-gtk.c:74 msgid "R-Stick Left" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:75 +#: ../plugins/dfinput/cfg-gtk.c:75 msgid "R-Stick Down" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:76 +#: ../plugins/dfinput/cfg-gtk.c:76 msgid "R-Stick Up" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Centered" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Up" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Right" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Rightup" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Down" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Rightdown" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Left" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Leftup" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +#: ../plugins/dfinput/cfg-gtk.c:104 ../plugins/dfinput/cfg-gtk.c:143 msgid "Leftdown" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:108 ../plugins/dfinput/cfg-gtk2.c:147 +#: ../plugins/dfinput/cfg-gtk.c:108 ../plugins/dfinput/cfg-gtk.c:147 #, c-format msgid "Joystick: Button %d" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:112 ../plugins/dfinput/cfg-gtk2.c:151 +#: ../plugins/dfinput/cfg-gtk.c:112 ../plugins/dfinput/cfg-gtk.c:151 #, c-format msgid "Joystick: Axis %d%c" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:117 ../plugins/dfinput/cfg-gtk2.c:156 +#: ../plugins/dfinput/cfg-gtk.c:117 ../plugins/dfinput/cfg-gtk.c:156 #, c-format msgid "Joystick: Hat %d %s" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:132 ../plugins/dfinput/cfg-gtk2.c:171 +#: ../plugins/dfinput/cfg-gtk.c:132 ../plugins/dfinput/cfg-gtk.c:171 msgid "Keyboard:" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:136 ../plugins/dfinput/cfg-gtk2.c:175 +#: ../plugins/dfinput/cfg-gtk.c:136 ../plugins/dfinput/cfg-gtk.c:175 msgid "(Not Set)" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:575 +#: ../plugins/dfinput/cfg-gtk.c:575 #: ../plugins/dfsound/spucfg-0.1df/dfsound.ui.h:14 #: ../plugins/peopsxgl/gpucfg/peopsxgl.ui.h:77 msgid "None" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:623 +#: ../plugins/dfinput/cfg-gtk.c:623 msgid "Gamepad/Keyboard Input Configuration" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:629 ../plugins/dfinput/cfg-gtk2.c:649 +#: ../plugins/dfinput/cfg-gtk.c:629 ../plugins/dfinput/cfg-gtk.c:649 msgid "Key" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:635 ../plugins/dfinput/cfg-gtk2.c:655 +#: ../plugins/dfinput/cfg-gtk.c:635 ../plugins/dfinput/cfg-gtk.c:655 msgid "Button" msgstr "" diff --git a/po/ru_RU.po b/po/ru_RU.po index 279c3816..e0df10c7 100755 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -554,7 +554,7 @@ msgstr "Открыть файл чита" msgid "PCSXR Cheat Code Files (*.cht)" msgstr "Файлы читов PCSXR (*.cht)" -#: ../gui/Cheat.c:309 ../gui/Gtk2Gui.c:475 ../gui/Gtk2Gui.c:616 +#: ../gui/Cheat.c:309 ../gui/GtkGui.c:475 ../gui/GtkGui.c:616 #: ../win32/gui/WndMain.c:1464 ../win32/gui/WndMain.c:1545 msgid "All Files" msgstr "Все файлы" @@ -694,93 +694,93 @@ msgstr "Адрес" msgid "Text" msgstr "Текст" -#: ../gui/Gtk2Gui.c:139 +#: ../gui/GtkGui.c:139 msgid "Ready" msgstr "Готово" -#: ../gui/Gtk2Gui.c:180 +#: ../gui/GtkGui.c:180 msgid "Emulation Paused." msgstr "Эмуляция приостановлена." -#: ../gui/Gtk2Gui.c:458 +#: ../gui/GtkGui.c:458 msgid "Select PSX EXE File" msgstr "Выберите PSX EXE файл" -#: ../gui/Gtk2Gui.c:471 +#: ../gui/GtkGui.c:471 msgid "PlayStation Executable Files" msgstr "Выполняемые файлы PlayStation" -#: ../gui/Gtk2Gui.c:508 +#: ../gui/GtkGui.c:508 msgid "Not a valid PSX file" msgstr "Недопустимый формат файла" -#: ../gui/Gtk2Gui.c:508 +#: ../gui/GtkGui.c:508 msgid "The file does not appear to be a valid Playstation executable" msgstr "Файл не является запускным файлом PlayStation" -#: ../gui/Gtk2Gui.c:537 ../gui/Gtk2Gui.c:692 +#: ../gui/GtkGui.c:537 ../gui/GtkGui.c:692 msgid "CD ROM failed" msgstr "Ошибка CD-привода" -#: ../gui/Gtk2Gui.c:537 ../gui/Gtk2Gui.c:692 ../win32/gui/WndMain.c:469 +#: ../gui/GtkGui.c:537 ../gui/GtkGui.c:692 ../win32/gui/WndMain.c:469 #: ../win32/gui/WndMain.c:521 ../win32/gui/WndMain.c:590 #, c-format msgid "The CD does not appear to be a valid Playstation CD" msgstr "Установленный CD-диск не является диском PlayStation" -#: ../gui/Gtk2Gui.c:548 ../gui/Gtk2Gui.c:703 ../win32/gui/WndMain.c:479 +#: ../gui/GtkGui.c:548 ../gui/GtkGui.c:703 ../win32/gui/WndMain.c:479 #: ../win32/gui/WndMain.c:531 ../win32/gui/WndMain.c:600 #, c-format msgid "Could not load CD-ROM!" msgstr "Не удалось загрузить CD-ROM!" -#: ../gui/Gtk2Gui.c:548 ../gui/Gtk2Gui.c:703 +#: ../gui/GtkGui.c:548 ../gui/GtkGui.c:703 msgid "The CD-ROM could not be loaded" msgstr "Не удалось загрузить CD-ROM" -#: ../gui/Gtk2Gui.c:562 +#: ../gui/GtkGui.c:562 msgid "Could not run BIOS" msgstr "Не удалось запустить биос" -#: ../gui/Gtk2Gui.c:562 +#: ../gui/GtkGui.c:562 msgid "Running BIOS is not supported with Internal HLE BIOS." msgstr "" "Стандартная оболочка, позволяющая управлять картами памяти и проигрывать DA " "музыку, при использовании HLE-биоса недоступна." -#: ../gui/Gtk2Gui.c:591 +#: ../gui/GtkGui.c:591 msgid "Open PSX Disc Image File" msgstr "Открыть образ PSX диска" -#: ../gui/Gtk2Gui.c:611 +#: ../gui/GtkGui.c:611 msgid "PSX Image Files (*.bin, *.img, *.mdf, *.iso)" msgstr "Образы PSX дисков (*.bin, *.img, *.mdf, *.iso)" -#: ../gui/Gtk2Gui.c:864 +#: ../gui/GtkGui.c:864 #, c-format msgid "Loaded state %s." msgstr "Состояние загружено %s." -#: ../gui/Gtk2Gui.c:867 +#: ../gui/GtkGui.c:867 #, c-format msgid "Error loading state %s!" msgstr "Ошибка загрузки состояния %s!" -#: ../gui/Gtk2Gui.c:878 +#: ../gui/GtkGui.c:878 #, c-format msgid "Saved state %s." msgstr "Состояние сохранено %s." -#: ../gui/Gtk2Gui.c:880 +#: ../gui/GtkGui.c:880 #, c-format msgid "Error saving state %s!" msgstr "Ошибка сохранения состояния %s!" -#: ../gui/Gtk2Gui.c:915 ../gui/Gtk2Gui.c:943 +#: ../gui/GtkGui.c:915 ../gui/GtkGui.c:943 msgid "Select State File" msgstr "Выберите файл состояния" -#: ../gui/Gtk2Gui.c:986 +#: ../gui/GtkGui.c:986 msgid "Notice" msgstr "Сообщение" @@ -1293,180 +1293,180 @@ msgstr "16мин" msgid "32min" msgstr "32мин" -#: ../plugins/dfinput/cfg-gtk2.c:49 +#: ../plugins/dfinput/cfg-gtk.c:49 msgid "D-Pad Up" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:50 +#: ../plugins/dfinput/cfg-gtk.c:50 msgid "D-Pad Down" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:51 +#: ../plugins/dfinput/cfg-gtk.c:51 msgid "D-Pad Left" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:52 +#: ../plugins/dfinput/cfg-gtk.c:52 msgid "D-Pad Right" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:53 +#: ../plugins/dfinput/cfg-gtk.c:53 msgid "Cross" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:54 +#: ../plugins/dfinput/cfg-gtk.c:54 msgid "Circle" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:55 +#: ../plugins/dfinput/cfg-gtk.c:55 msgid "Square" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:56 +#: ../plugins/dfinput/cfg-gtk.c:56 msgid "Triangle" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:57 +#: ../plugins/dfinput/cfg-gtk.c:57 msgid "L1" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:58 +#: ../plugins/dfinput/cfg-gtk.c:58 msgid "R1" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:59 +#: ../plugins/dfinput/cfg-gtk.c:59 msgid "L2" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:60 +#: ../plugins/dfinput/cfg-gtk.c:60 msgid "R2" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:61 +#: ../plugins/dfinput/cfg-gtk.c:61 msgid "Select" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:62 +#: ../plugins/dfinput/cfg-gtk.c:62 msgid "Start" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:63 +#: ../plugins/dfinput/cfg-gtk.c:63 msgid "L3" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:64 +#: ../plugins/dfinput/cfg-gtk.c:64 msgid "R3" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:65 +#: ../plugins/dfinput/cfg-gtk.c:65 msgid "Analog" msgstr "Аналоговый контроллер " -#: ../plugins/dfinput/cfg-gtk2.c:69 +#: ../plugins/dfinput/cfg-gtk.c:69 msgid "L-Stick Right" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:70 +#: ../plugins/dfinput/cfg-gtk.c:70 msgid "L-Stick Left" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:71 +#: ../plugins/dfinput/cfg-gtk.c:71 msgid "L-Stick Down" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:72 +#: ../plugins/dfinput/cfg-gtk.c:72 msgid "L-Stick Up" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:73 +#: ../plugins/dfinput/cfg-gtk.c:73 msgid "R-Stick Right" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:74 +#: ../plugins/dfinput/cfg-gtk.c:74 msgid "R-Stick Left" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:75 +#: ../plugins/dfinput/cfg-gtk.c:75 msgid "R-Stick Down" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:76 +#: ../plugins/dfinput/cfg-gtk.c:76 msgid "R-Stick Up" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Centered" msgstr "Отцентровано" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Up" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Right" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Rightup" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Down" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Rightdown" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Left" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Leftup" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +#: ../plugins/dfinput/cfg-gtk.c:104 ../plugins/dfinput/cfg-gtk.c:143 msgid "Leftdown" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:108 ../plugins/dfinput/cfg-gtk2.c:147 +#: ../plugins/dfinput/cfg-gtk.c:108 ../plugins/dfinput/cfg-gtk.c:147 #, c-format msgid "Joystick: Button %d" msgstr "Джойстик: Кнопка %d" -#: ../plugins/dfinput/cfg-gtk2.c:112 ../plugins/dfinput/cfg-gtk2.c:151 +#: ../plugins/dfinput/cfg-gtk.c:112 ../plugins/dfinput/cfg-gtk.c:151 #, c-format msgid "Joystick: Axis %d%c" msgstr "Джойстик: Ось %d%c" -#: ../plugins/dfinput/cfg-gtk2.c:117 ../plugins/dfinput/cfg-gtk2.c:156 +#: ../plugins/dfinput/cfg-gtk.c:117 ../plugins/dfinput/cfg-gtk.c:156 #, c-format msgid "Joystick: Hat %d %s" msgstr "Джойстик: Крестовина %d %s" -#: ../plugins/dfinput/cfg-gtk2.c:132 ../plugins/dfinput/cfg-gtk2.c:171 +#: ../plugins/dfinput/cfg-gtk.c:132 ../plugins/dfinput/cfg-gtk.c:171 msgid "Keyboard:" msgstr "Клавиатура:" -#: ../plugins/dfinput/cfg-gtk2.c:136 ../plugins/dfinput/cfg-gtk2.c:175 +#: ../plugins/dfinput/cfg-gtk.c:136 ../plugins/dfinput/cfg-gtk.c:175 msgid "(Not Set)" msgstr "(Не установлено)" -#: ../plugins/dfinput/cfg-gtk2.c:575 +#: ../plugins/dfinput/cfg-gtk.c:575 #: ../plugins/dfsound/spucfg-0.1df/dfsound.ui.h:14 #: ../plugins/peopsxgl/gpucfg/peopsxgl.ui.h:77 msgid "None" msgstr "Нету" -#: ../plugins/dfinput/cfg-gtk2.c:623 +#: ../plugins/dfinput/cfg-gtk.c:623 msgid "Gamepad/Keyboard Input Configuration" msgstr "Настройка Gamepad/Keyboard" -#: ../plugins/dfinput/cfg-gtk2.c:629 ../plugins/dfinput/cfg-gtk2.c:649 +#: ../plugins/dfinput/cfg-gtk.c:629 ../plugins/dfinput/cfg-gtk.c:649 msgid "Key" msgstr "Клавиша" -#: ../plugins/dfinput/cfg-gtk2.c:635 ../plugins/dfinput/cfg-gtk2.c:655 +#: ../plugins/dfinput/cfg-gtk.c:635 ../plugins/dfinput/cfg-gtk.c:655 msgid "Button" msgstr "Кнопка" diff --git a/po/zh_CN.po b/po/zh_CN.po index eeb9ea3c..be35a6c6 100755 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -600,8 +600,8 @@ msgid "PCSXR Cheat Code Files (*.cht)" msgstr "PCSXR 作弊码文件 (*.cht)" #: ../gui/Cheat.c:309 -#: ../gui/Gtk2Gui.c:475 -#: ../gui/Gtk2Gui.c:616 +#: ../gui/GtkGui.c:475 +#: ../gui/GtkGui.c:616 #: ../win32/gui/WndMain.c:1464 #: ../win32/gui/WndMain.c:1545 msgid "All Files" @@ -759,37 +759,37 @@ msgstr "地址" msgid "Text" msgstr "文本" -#: ../gui/Gtk2Gui.c:139 +#: ../gui/GtkGui.c:139 msgid "Ready" msgstr "就绪" -#: ../gui/Gtk2Gui.c:180 +#: ../gui/GtkGui.c:180 msgid "Emulation Paused." msgstr "模拟器已暂停。" -#: ../gui/Gtk2Gui.c:458 +#: ../gui/GtkGui.c:458 msgid "Select PSX EXE File" msgstr "选择 PS EXE 文件" -#: ../gui/Gtk2Gui.c:471 +#: ../gui/GtkGui.c:471 msgid "PlayStation Executable Files" msgstr "PlayStation 可执行文件" -#: ../gui/Gtk2Gui.c:508 +#: ../gui/GtkGui.c:508 msgid "Not a valid PSX file" msgstr "不是一个合法的 PSX 文件" -#: ../gui/Gtk2Gui.c:508 +#: ../gui/GtkGui.c:508 msgid "The file does not appear to be a valid Playstation executable" msgstr "此文件不是一个合法的 PlayStation 可执行文件" -#: ../gui/Gtk2Gui.c:537 -#: ../gui/Gtk2Gui.c:692 +#: ../gui/GtkGui.c:537 +#: ../gui/GtkGui.c:692 msgid "CD ROM failed" msgstr "CD-ROM 失败" -#: ../gui/Gtk2Gui.c:537 -#: ../gui/Gtk2Gui.c:692 +#: ../gui/GtkGui.c:537 +#: ../gui/GtkGui.c:692 #: ../win32/gui/WndMain.c:469 #: ../win32/gui/WndMain.c:521 #: ../win32/gui/WndMain.c:590 @@ -797,8 +797,8 @@ msgstr "CD-ROM 失败" msgid "The CD does not appear to be a valid Playstation CD" msgstr "此光盘不是一张合法的 PlayStation 光盘。" -#: ../gui/Gtk2Gui.c:548 -#: ../gui/Gtk2Gui.c:703 +#: ../gui/GtkGui.c:548 +#: ../gui/GtkGui.c:703 #: ../win32/gui/WndMain.c:479 #: ../win32/gui/WndMain.c:531 #: ../win32/gui/WndMain.c:600 @@ -806,53 +806,53 @@ msgstr "此光盘不是一张合法的 PlayStation 光盘。" msgid "Could not load CD-ROM!" msgstr "无法加载光盘!" -#: ../gui/Gtk2Gui.c:548 -#: ../gui/Gtk2Gui.c:703 +#: ../gui/GtkGui.c:548 +#: ../gui/GtkGui.c:703 msgid "The CD-ROM could not be loaded" msgstr "无法加载 CD-ROM" -#: ../gui/Gtk2Gui.c:562 +#: ../gui/GtkGui.c:562 msgid "Could not run BIOS" msgstr "无法运行 BIOS" -#: ../gui/Gtk2Gui.c:562 +#: ../gui/GtkGui.c:562 msgid "Running BIOS is not supported with Internal HLE BIOS." msgstr "内部 HLE BIOS 不支持直接运行。" -#: ../gui/Gtk2Gui.c:591 +#: ../gui/GtkGui.c:591 msgid "Open PSX Disc Image File" msgstr "打开 PS 光盘镜像文件" -#: ../gui/Gtk2Gui.c:611 +#: ../gui/GtkGui.c:611 msgid "PSX Image Files (*.bin, *.img, *.mdf, *.iso)" msgstr "PS 镜像文件 (*.bin, *.img, *.mdf, *.iso)" -#: ../gui/Gtk2Gui.c:864 +#: ../gui/GtkGui.c:864 #, c-format msgid "Loaded state %s." msgstr "已读取存档 %s。" -#: ../gui/Gtk2Gui.c:867 +#: ../gui/GtkGui.c:867 #, c-format msgid "Error loading state %s!" msgstr "读取存档 %s 时出错。" -#: ../gui/Gtk2Gui.c:878 +#: ../gui/GtkGui.c:878 #, c-format msgid "Saved state %s." msgstr "已保存存档 %s" -#: ../gui/Gtk2Gui.c:880 +#: ../gui/GtkGui.c:880 #, c-format msgid "Error saving state %s!" msgstr "保存存档 %s 时出错。" -#: ../gui/Gtk2Gui.c:915 -#: ../gui/Gtk2Gui.c:943 +#: ../gui/GtkGui.c:915 +#: ../gui/GtkGui.c:943 msgid "Select State File" msgstr "选择存档文件" -#: ../gui/Gtk2Gui.c:986 +#: ../gui/GtkGui.c:986 msgid "Notice" msgstr "警告" @@ -1365,196 +1365,196 @@ msgstr "16分钟" msgid "32min" msgstr "32分钟" -#: ../plugins/dfinput/cfg-gtk2.c:49 +#: ../plugins/dfinput/cfg-gtk.c:49 msgid "D-Pad Up" msgstr "方向键上" -#: ../plugins/dfinput/cfg-gtk2.c:50 +#: ../plugins/dfinput/cfg-gtk.c:50 msgid "D-Pad Down" msgstr "方向键下" -#: ../plugins/dfinput/cfg-gtk2.c:51 +#: ../plugins/dfinput/cfg-gtk.c:51 msgid "D-Pad Left" msgstr "方向键左" -#: ../plugins/dfinput/cfg-gtk2.c:52 +#: ../plugins/dfinput/cfg-gtk.c:52 msgid "D-Pad Right" msgstr "方向键右" -#: ../plugins/dfinput/cfg-gtk2.c:53 +#: ../plugins/dfinput/cfg-gtk.c:53 msgid "Cross" msgstr "叉号键" -#: ../plugins/dfinput/cfg-gtk2.c:54 +#: ../plugins/dfinput/cfg-gtk.c:54 msgid "Circle" msgstr "圆圈键" -#: ../plugins/dfinput/cfg-gtk2.c:55 +#: ../plugins/dfinput/cfg-gtk.c:55 msgid "Square" msgstr "方块键" -#: ../plugins/dfinput/cfg-gtk2.c:56 +#: ../plugins/dfinput/cfg-gtk.c:56 msgid "Triangle" msgstr "三角键" -#: ../plugins/dfinput/cfg-gtk2.c:57 +#: ../plugins/dfinput/cfg-gtk.c:57 msgid "L1" msgstr "L1" -#: ../plugins/dfinput/cfg-gtk2.c:58 +#: ../plugins/dfinput/cfg-gtk.c:58 msgid "R1" msgstr "R1" -#: ../plugins/dfinput/cfg-gtk2.c:59 +#: ../plugins/dfinput/cfg-gtk.c:59 msgid "L2" msgstr "L2" -#: ../plugins/dfinput/cfg-gtk2.c:60 +#: ../plugins/dfinput/cfg-gtk.c:60 msgid "R2" msgstr "R2" -#: ../plugins/dfinput/cfg-gtk2.c:61 +#: ../plugins/dfinput/cfg-gtk.c:61 msgid "Select" msgstr "选择键" -#: ../plugins/dfinput/cfg-gtk2.c:62 +#: ../plugins/dfinput/cfg-gtk.c:62 msgid "Start" msgstr "开始键" -#: ../plugins/dfinput/cfg-gtk2.c:63 +#: ../plugins/dfinput/cfg-gtk.c:63 msgid "L3" msgstr "L3" -#: ../plugins/dfinput/cfg-gtk2.c:64 +#: ../plugins/dfinput/cfg-gtk.c:64 msgid "R3" msgstr "R3" -#: ../plugins/dfinput/cfg-gtk2.c:65 +#: ../plugins/dfinput/cfg-gtk.c:65 msgid "Analog" msgstr "摇杆手柄" -#: ../plugins/dfinput/cfg-gtk2.c:69 +#: ../plugins/dfinput/cfg-gtk.c:69 msgid "L-Stick Right" msgstr "左摇杆右方向" -#: ../plugins/dfinput/cfg-gtk2.c:70 +#: ../plugins/dfinput/cfg-gtk.c:70 msgid "L-Stick Left" msgstr "左摇杆左方向" -#: ../plugins/dfinput/cfg-gtk2.c:71 +#: ../plugins/dfinput/cfg-gtk.c:71 msgid "L-Stick Down" msgstr "左摇杆下方向" -#: ../plugins/dfinput/cfg-gtk2.c:72 +#: ../plugins/dfinput/cfg-gtk.c:72 msgid "L-Stick Up" msgstr "左摇杆上方向" -#: ../plugins/dfinput/cfg-gtk2.c:73 +#: ../plugins/dfinput/cfg-gtk.c:73 msgid "R-Stick Right" msgstr "右摇杆右方向" -#: ../plugins/dfinput/cfg-gtk2.c:74 +#: ../plugins/dfinput/cfg-gtk.c:74 msgid "R-Stick Left" msgstr "右摇杆左方向" -#: ../plugins/dfinput/cfg-gtk2.c:75 +#: ../plugins/dfinput/cfg-gtk.c:75 msgid "R-Stick Down" msgstr "右摇杆下方向" -#: ../plugins/dfinput/cfg-gtk2.c:76 +#: ../plugins/dfinput/cfg-gtk.c:76 msgid "R-Stick Up" msgstr "右摇杆上方向" -#: ../plugins/dfinput/cfg-gtk2.c:102 -#: ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 +#: ../plugins/dfinput/cfg-gtk.c:141 msgid "Centered" msgstr "居中" -#: ../plugins/dfinput/cfg-gtk2.c:102 -#: ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 +#: ../plugins/dfinput/cfg-gtk.c:141 msgid "Up" msgstr "上" -#: ../plugins/dfinput/cfg-gtk2.c:102 -#: ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 +#: ../plugins/dfinput/cfg-gtk.c:141 msgid "Right" msgstr "右方向键" -#: ../plugins/dfinput/cfg-gtk2.c:102 -#: ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 +#: ../plugins/dfinput/cfg-gtk.c:141 msgid "Rightup" msgstr "右上" -#: ../plugins/dfinput/cfg-gtk2.c:103 -#: ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 +#: ../plugins/dfinput/cfg-gtk.c:142 msgid "Down" msgstr "下" -#: ../plugins/dfinput/cfg-gtk2.c:103 -#: ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 +#: ../plugins/dfinput/cfg-gtk.c:142 msgid "Rightdown" msgstr "右下" -#: ../plugins/dfinput/cfg-gtk2.c:103 -#: ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 +#: ../plugins/dfinput/cfg-gtk.c:142 msgid "Left" msgstr "左" -#: ../plugins/dfinput/cfg-gtk2.c:103 -#: ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 +#: ../plugins/dfinput/cfg-gtk.c:142 msgid "Leftup" msgstr "左上" -#: ../plugins/dfinput/cfg-gtk2.c:104 -#: ../plugins/dfinput/cfg-gtk2.c:143 +#: ../plugins/dfinput/cfg-gtk.c:104 +#: ../plugins/dfinput/cfg-gtk.c:143 msgid "Leftdown" msgstr "左下" -#: ../plugins/dfinput/cfg-gtk2.c:108 -#: ../plugins/dfinput/cfg-gtk2.c:147 +#: ../plugins/dfinput/cfg-gtk.c:108 +#: ../plugins/dfinput/cfg-gtk.c:147 #, c-format msgid "Joystick: Button %d" msgstr "手柄: 按钮 %d" -#: ../plugins/dfinput/cfg-gtk2.c:112 -#: ../plugins/dfinput/cfg-gtk2.c:151 +#: ../plugins/dfinput/cfg-gtk.c:112 +#: ../plugins/dfinput/cfg-gtk.c:151 #, c-format msgid "Joystick: Axis %d%c" msgstr "手柄: 轴 %d%c" -#: ../plugins/dfinput/cfg-gtk2.c:117 -#: ../plugins/dfinput/cfg-gtk2.c:156 +#: ../plugins/dfinput/cfg-gtk.c:117 +#: ../plugins/dfinput/cfg-gtk.c:156 #, c-format msgid "Joystick: Hat %d %s" msgstr "Joystick: 操纵杆 %d %s" -#: ../plugins/dfinput/cfg-gtk2.c:132 -#: ../plugins/dfinput/cfg-gtk2.c:171 +#: ../plugins/dfinput/cfg-gtk.c:132 +#: ../plugins/dfinput/cfg-gtk.c:171 msgid "Keyboard:" msgstr "键盘:" -#: ../plugins/dfinput/cfg-gtk2.c:136 -#: ../plugins/dfinput/cfg-gtk2.c:175 +#: ../plugins/dfinput/cfg-gtk.c:136 +#: ../plugins/dfinput/cfg-gtk.c:175 msgid "(Not Set)" msgstr "(未设定)" -#: ../plugins/dfinput/cfg-gtk2.c:575 +#: ../plugins/dfinput/cfg-gtk.c:575 #: ../plugins/dfsound/spucfg-0.1df/dfsound.ui.h:14 #: ../plugins/peopsxgl/gpucfg/peopsxgl.ui.h:77 msgid "None" msgstr "无" -#: ../plugins/dfinput/cfg-gtk2.c:623 +#: ../plugins/dfinput/cfg-gtk.c:623 msgid "Gamepad/Keyboard Input Configuration" msgstr "手柄/键盘输入配置" -#: ../plugins/dfinput/cfg-gtk2.c:629 -#: ../plugins/dfinput/cfg-gtk2.c:649 +#: ../plugins/dfinput/cfg-gtk.c:629 +#: ../plugins/dfinput/cfg-gtk.c:649 msgid "Key" msgstr "按钮" -#: ../plugins/dfinput/cfg-gtk2.c:635 -#: ../plugins/dfinput/cfg-gtk2.c:655 +#: ../plugins/dfinput/cfg-gtk.c:635 +#: ../plugins/dfinput/cfg-gtk.c:655 msgid "Button" msgstr "按键" diff --git a/po/zh_TW.po b/po/zh_TW.po index 7ed34a78..63927dae 100755 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -572,7 +572,7 @@ msgstr "打開金手指檔" msgid "PCSXR Cheat Code Files (*.cht)" msgstr "PCSXR 金手指檔 (*.cht)" -#: ../gui/Cheat.c:309 ../gui/Gtk2Gui.c:475 ../gui/Gtk2Gui.c:616 +#: ../gui/Cheat.c:309 ../gui/GtkGui.c:475 ../gui/GtkGui.c:616 #: ../win32/gui/WndMain.c:1464 ../win32/gui/WndMain.c:1545 msgid "All Files" msgstr "所有檔案" @@ -712,91 +712,91 @@ msgstr "位址" msgid "Text" msgstr "文字" -#: ../gui/Gtk2Gui.c:139 +#: ../gui/GtkGui.c:139 msgid "Ready" msgstr "就緒" -#: ../gui/Gtk2Gui.c:180 +#: ../gui/GtkGui.c:180 msgid "Emulation Paused." msgstr "模擬器已暫停。" -#: ../gui/Gtk2Gui.c:458 +#: ../gui/GtkGui.c:458 msgid "Select PSX EXE File" msgstr "選擇 PS EXE 檔案" -#: ../gui/Gtk2Gui.c:471 +#: ../gui/GtkGui.c:471 msgid "PlayStation Executable Files" msgstr "PlayStation 執行檔" -#: ../gui/Gtk2Gui.c:508 +#: ../gui/GtkGui.c:508 msgid "Not a valid PSX file" msgstr "不是一個合法的 PSX 檔" -#: ../gui/Gtk2Gui.c:508 +#: ../gui/GtkGui.c:508 msgid "The file does not appear to be a valid Playstation executable" msgstr "此文件不是一個合法的 PlayStation 執行檔" -#: ../gui/Gtk2Gui.c:537 ../gui/Gtk2Gui.c:692 +#: ../gui/GtkGui.c:537 ../gui/GtkGui.c:692 msgid "CD ROM failed" msgstr "CD-ROM 失敗" -#: ../gui/Gtk2Gui.c:537 ../gui/Gtk2Gui.c:692 ../win32/gui/WndMain.c:469 +#: ../gui/GtkGui.c:537 ../gui/GtkGui.c:692 ../win32/gui/WndMain.c:469 #: ../win32/gui/WndMain.c:521 ../win32/gui/WndMain.c:590 #, c-format msgid "The CD does not appear to be a valid Playstation CD" msgstr "此光碟不是一張合法的 PlayStation 光碟。" -#: ../gui/Gtk2Gui.c:548 ../gui/Gtk2Gui.c:703 ../win32/gui/WndMain.c:479 +#: ../gui/GtkGui.c:548 ../gui/GtkGui.c:703 ../win32/gui/WndMain.c:479 #: ../win32/gui/WndMain.c:531 ../win32/gui/WndMain.c:600 #, c-format msgid "Could not load CD-ROM!" msgstr "無法加載光碟!" -#: ../gui/Gtk2Gui.c:548 ../gui/Gtk2Gui.c:703 +#: ../gui/GtkGui.c:548 ../gui/GtkGui.c:703 msgid "The CD-ROM could not be loaded" msgstr "無法加載 CD-ROM" -#: ../gui/Gtk2Gui.c:562 +#: ../gui/GtkGui.c:562 msgid "Could not run BIOS" msgstr "無法執行 BIOS" -#: ../gui/Gtk2Gui.c:562 +#: ../gui/GtkGui.c:562 msgid "Running BIOS is not supported with Internal HLE BIOS." msgstr "內部 HLE BIOS 不支援直接執行。" -#: ../gui/Gtk2Gui.c:591 +#: ../gui/GtkGui.c:591 msgid "Open PSX Disc Image File" msgstr "打開 PS 光碟映像檔" -#: ../gui/Gtk2Gui.c:611 +#: ../gui/GtkGui.c:611 msgid "PSX Image Files (*.bin, *.img, *.mdf, *.iso)" msgstr "PS 鏡像檔 (*.bin, *.img, *.mdf, *.iso)" -#: ../gui/Gtk2Gui.c:864 +#: ../gui/GtkGui.c:864 #, c-format msgid "Loaded state %s." msgstr "已讀取記錄 %s。" -#: ../gui/Gtk2Gui.c:867 +#: ../gui/GtkGui.c:867 #, c-format msgid "Error loading state %s!" msgstr "讀取記錄 %s 時出錯。" -#: ../gui/Gtk2Gui.c:878 +#: ../gui/GtkGui.c:878 #, c-format msgid "Saved state %s." msgstr "已存儲記錄 %s" -#: ../gui/Gtk2Gui.c:880 +#: ../gui/GtkGui.c:880 #, c-format msgid "Error saving state %s!" msgstr "存儲記錄 %s 時出錯。" -#: ../gui/Gtk2Gui.c:915 ../gui/Gtk2Gui.c:943 +#: ../gui/GtkGui.c:915 ../gui/GtkGui.c:943 msgid "Select State File" msgstr "選擇記錄檔案" -#: ../gui/Gtk2Gui.c:986 +#: ../gui/GtkGui.c:986 msgid "Notice" msgstr "警告" @@ -1297,181 +1297,181 @@ msgstr "" msgid "32min" msgstr "" -#: ../plugins/dfinput/cfg-gtk2.c:49 +#: ../plugins/dfinput/cfg-gtk.c:49 msgid "D-Pad Up" msgstr "上方向鍵" -#: ../plugins/dfinput/cfg-gtk2.c:50 +#: ../plugins/dfinput/cfg-gtk.c:50 msgid "D-Pad Down" msgstr "下方向鍵" -#: ../plugins/dfinput/cfg-gtk2.c:51 +#: ../plugins/dfinput/cfg-gtk.c:51 msgid "D-Pad Left" msgstr "左方向鍵" -#: ../plugins/dfinput/cfg-gtk2.c:52 +#: ../plugins/dfinput/cfg-gtk.c:52 msgid "D-Pad Right" msgstr "右方向鍵" -#: ../plugins/dfinput/cfg-gtk2.c:53 +#: ../plugins/dfinput/cfg-gtk.c:53 msgid "Cross" msgstr "叉號鍵" -#: ../plugins/dfinput/cfg-gtk2.c:54 +#: ../plugins/dfinput/cfg-gtk.c:54 msgid "Circle" msgstr "圓圈鍵" -#: ../plugins/dfinput/cfg-gtk2.c:55 +#: ../plugins/dfinput/cfg-gtk.c:55 msgid "Square" msgstr "方塊鍵" -#: ../plugins/dfinput/cfg-gtk2.c:56 +#: ../plugins/dfinput/cfg-gtk.c:56 msgid "Triangle" msgstr "三角鍵" -#: ../plugins/dfinput/cfg-gtk2.c:57 +#: ../plugins/dfinput/cfg-gtk.c:57 msgid "L1" msgstr "L1" -#: ../plugins/dfinput/cfg-gtk2.c:58 +#: ../plugins/dfinput/cfg-gtk.c:58 msgid "R1" msgstr "R1" -#: ../plugins/dfinput/cfg-gtk2.c:59 +#: ../plugins/dfinput/cfg-gtk.c:59 msgid "L2" msgstr "L2" -#: ../plugins/dfinput/cfg-gtk2.c:60 +#: ../plugins/dfinput/cfg-gtk.c:60 msgid "R2" msgstr "R2" -#: ../plugins/dfinput/cfg-gtk2.c:61 +#: ../plugins/dfinput/cfg-gtk.c:61 msgid "Select" msgstr "選擇鍵" -#: ../plugins/dfinput/cfg-gtk2.c:62 +#: ../plugins/dfinput/cfg-gtk.c:62 msgid "Start" msgstr "開始鍵" -#: ../plugins/dfinput/cfg-gtk2.c:63 +#: ../plugins/dfinput/cfg-gtk.c:63 msgid "L3" msgstr "L3" -#: ../plugins/dfinput/cfg-gtk2.c:64 +#: ../plugins/dfinput/cfg-gtk.c:64 msgid "R3" msgstr "R3" -#: ../plugins/dfinput/cfg-gtk2.c:65 +#: ../plugins/dfinput/cfg-gtk.c:65 #, fuzzy msgid "Analog" msgstr "類比手把" -#: ../plugins/dfinput/cfg-gtk2.c:69 +#: ../plugins/dfinput/cfg-gtk.c:69 msgid "L-Stick Right" msgstr "左搖桿右方向" -#: ../plugins/dfinput/cfg-gtk2.c:70 +#: ../plugins/dfinput/cfg-gtk.c:70 msgid "L-Stick Left" msgstr "左搖桿左方向" -#: ../plugins/dfinput/cfg-gtk2.c:71 +#: ../plugins/dfinput/cfg-gtk.c:71 msgid "L-Stick Down" msgstr "左搖桿下方向" -#: ../plugins/dfinput/cfg-gtk2.c:72 +#: ../plugins/dfinput/cfg-gtk.c:72 msgid "L-Stick Up" msgstr "左搖桿上方向" -#: ../plugins/dfinput/cfg-gtk2.c:73 +#: ../plugins/dfinput/cfg-gtk.c:73 msgid "R-Stick Right" msgstr "右搖桿右方向" -#: ../plugins/dfinput/cfg-gtk2.c:74 +#: ../plugins/dfinput/cfg-gtk.c:74 msgid "R-Stick Left" msgstr "右搖桿左方向" -#: ../plugins/dfinput/cfg-gtk2.c:75 +#: ../plugins/dfinput/cfg-gtk.c:75 msgid "R-Stick Down" msgstr "右搖桿下方向" -#: ../plugins/dfinput/cfg-gtk2.c:76 +#: ../plugins/dfinput/cfg-gtk.c:76 msgid "R-Stick Up" msgstr "右搖桿上方向" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Centered" msgstr "居中" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Up" msgstr "上" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Right" msgstr "右" -#: ../plugins/dfinput/cfg-gtk2.c:102 ../plugins/dfinput/cfg-gtk2.c:141 +#: ../plugins/dfinput/cfg-gtk.c:102 ../plugins/dfinput/cfg-gtk.c:141 msgid "Rightup" msgstr "右上" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Down" msgstr "下" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Rightdown" msgstr "右下" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Left" msgstr "左" -#: ../plugins/dfinput/cfg-gtk2.c:103 ../plugins/dfinput/cfg-gtk2.c:142 +#: ../plugins/dfinput/cfg-gtk.c:103 ../plugins/dfinput/cfg-gtk.c:142 msgid "Leftup" msgstr "左上" -#: ../plugins/dfinput/cfg-gtk2.c:104 ../plugins/dfinput/cfg-gtk2.c:143 +#: ../plugins/dfinput/cfg-gtk.c:104 ../plugins/dfinput/cfg-gtk.c:143 msgid "Leftdown" msgstr "左下" -#: ../plugins/dfinput/cfg-gtk2.c:108 ../plugins/dfinput/cfg-gtk2.c:147 +#: ../plugins/dfinput/cfg-gtk.c:108 ../plugins/dfinput/cfg-gtk.c:147 #, c-format msgid "Joystick: Button %d" msgstr "手把: 按鈕 %d" -#: ../plugins/dfinput/cfg-gtk2.c:112 ../plugins/dfinput/cfg-gtk2.c:151 +#: ../plugins/dfinput/cfg-gtk.c:112 ../plugins/dfinput/cfg-gtk.c:151 #, c-format msgid "Joystick: Axis %d%c" msgstr "手把: 軸 %d%c" -#: ../plugins/dfinput/cfg-gtk2.c:117 ../plugins/dfinput/cfg-gtk2.c:156 +#: ../plugins/dfinput/cfg-gtk.c:117 ../plugins/dfinput/cfg-gtk.c:156 #, c-format msgid "Joystick: Hat %d %s" msgstr "手把: Hat %d %s" -#: ../plugins/dfinput/cfg-gtk2.c:132 ../plugins/dfinput/cfg-gtk2.c:171 +#: ../plugins/dfinput/cfg-gtk.c:132 ../plugins/dfinput/cfg-gtk.c:171 msgid "Keyboard:" msgstr "鍵盤:" -#: ../plugins/dfinput/cfg-gtk2.c:136 ../plugins/dfinput/cfg-gtk2.c:175 +#: ../plugins/dfinput/cfg-gtk.c:136 ../plugins/dfinput/cfg-gtk.c:175 msgid "(Not Set)" msgstr "(未設定)" -#: ../plugins/dfinput/cfg-gtk2.c:575 +#: ../plugins/dfinput/cfg-gtk.c:575 #: ../plugins/dfsound/spucfg-0.1df/dfsound.ui.h:14 #: ../plugins/peopsxgl/gpucfg/peopsxgl.ui.h:77 msgid "None" msgstr "無" -#: ../plugins/dfinput/cfg-gtk2.c:623 +#: ../plugins/dfinput/cfg-gtk.c:623 msgid "Gamepad/Keyboard Input Configuration" msgstr "手把/鍵盤輸入設定" -#: ../plugins/dfinput/cfg-gtk2.c:629 ../plugins/dfinput/cfg-gtk2.c:649 +#: ../plugins/dfinput/cfg-gtk.c:629 ../plugins/dfinput/cfg-gtk.c:649 msgid "Key" msgstr "按鍵" -#: ../plugins/dfinput/cfg-gtk2.c:635 ../plugins/dfinput/cfg-gtk2.c:655 +#: ../plugins/dfinput/cfg-gtk.c:635 ../plugins/dfinput/cfg-gtk.c:655 msgid "Button" msgstr "按鈕" -- cgit v1.2.3