summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-12-28 09:04:21 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2009-12-28 09:04:21 +0000
commitb7e261606bffd87c8bcc81a76cf09b276eca7ec1 (patch)
tree5c7cb22ffeb3eb604d574d1bd19b5e68fc75b668
parentc3282a78c64fae6b9aa96b04f2ccef3f646d55ca (diff)
downloadpcsxr-b7e261606bffd87c8bcc81a76cf09b276eca7ec1.tar.gz
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@39695 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rw-r--r--ChangeLog15
-rw-r--r--data/pcsx.glade262
-rw-r--r--gui/ConfDlg.c123
-rw-r--r--plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade221
-rw-r--r--plugins/dfcdrom/cdrcfg-0.1df/main.c11
-rw-r--r--plugins/dfinput/cfg-gtk2.c13
-rw-r--r--plugins/dfinput/dfinput.glade218
-rw-r--r--plugins/dfsound/spucfg-0.1df/dfsound.glade220
-rw-r--r--plugins/dfsound/spucfg-0.1df/main.c140
-rw-r--r--plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade220
-rw-r--r--plugins/dfxvideo/gpucfg-0.1df/main.c43
-rw-r--r--po/zh_TW.po48
12 files changed, 172 insertions, 362 deletions
diff --git a/ChangeLog b/ChangeLog
index f329c655..756afdfc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+December 28, 2009 Wei Mingzhi <weimingzhi@gmail.com>
+
+ * data/pcsx.glade2: Reverted to "Close" button instead of "OK/Cancel" for
+ consistency with GNOME UI standards.
+ * plugins/dfsound/spucfg-0.1df/dfsound.glade2: Likewise.
+ * plugins/dfsound/spucfg-0.1df/main.c: Likewise.
+ * plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2: Likewise.
+ * plugins/dfxvideo/gpucfg-0.1df/main.c: Likewise.
+ * plugins/dfinput/cfg-gtk2.c: Likewise.
+ * plugins/dfinput/dfinput.glade2: Likewise.
+ * plugins/dfcdrom/cdrcfg-0.1df/main.c: Likewise.
+ * plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2: Likewise.
+ * gui/ConfDlg.c: Likewise.
+ * po/zh_TW.po: Updated.
+
December 19, 2009 Wei Mingzhi <weimingzhi@gmail.com>
* win32/gui/WndMain.c: Added Portuguese (Brazilian) to the language list.
diff --git a/data/pcsx.glade2 b/data/pcsx.glade2
index f188894d..259eed76 100644
--- a/data/pcsx.glade2
+++ b/data/pcsx.glade2
@@ -1334,8 +1334,8 @@
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
- <widget class="GtkButton" id="btn_ConfCancel">
- <property name="label">gtk-cancel</property>
+ <widget class="GtkButton" id="btn_ConfClose">
+ <property name="label">gtk-close</property>
<property name="response_id">-6</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -1348,23 +1348,6 @@
<property name="position">0</property>
</packing>
</child>
- <child>
- <widget class="GtkButton" id="btn_ConfOk">
- <property name="label">gtk-ok</property>
- <property name="response_id">-5</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- <signal name="clicked" handler="OnConfConf_Ok"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -1653,8 +1636,8 @@ PAL</property>
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
- <widget class="GtkButton" id="cancelbutton1">
- <property name="label">gtk-cancel</property>
+ <widget class="GtkButton" id="closebutton1">
+ <property name="label">gtk-close</property>
<property name="response_id">-6</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -1667,22 +1650,6 @@ PAL</property>
<property name="position">0</property>
</packing>
</child>
- <child>
- <widget class="GtkButton" id="okbutton1">
- <property name="label">gtk-ok</property>
- <property name="response_id">-5</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -1807,8 +1774,8 @@ PAL</property>
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
- <widget class="GtkButton" id="cancelbutton2">
- <property name="label">gtk-cancel</property>
+ <widget class="GtkButton" id="closebutton2">
+ <property name="label">gtk-close</property>
<property name="response_id">-6</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -1821,23 +1788,6 @@ PAL</property>
<property name="position">0</property>
</packing>
</child>
- <child>
- <widget class="GtkButton" id="okbutton2">
- <property name="label">gtk-ok</property>
- <property name="response_id">-5</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- <signal name="clicked" handler="OnNet_OK"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/gui/ConfDlg.c b/gui/ConfDlg.c
index 5320629b..27e0b90e 100644
--- a/gui/ConfDlg.c
+++ b/gui/ConfDlg.c
@@ -179,12 +179,9 @@ void ConfigurePlugins() {
}
void OnNet_Clicked(GtkDialog *dialog, gint arg1, gpointer user_data) {
- if (arg1 == GTK_RESPONSE_OK) {
- GetComboText(NetConfS.Combo, NetConfS.plist, Config.Net);
- SaveConfig();
- }
-
- gtk_widget_destroy(GTK_WIDGET (dialog));
+ GetComboText(NetConfS.Combo, NetConfS.plist, Config.Net);
+ SaveConfig();
+ gtk_widget_destroy(GTK_WIDGET(dialog));
NetDlg = NULL;
}
@@ -450,16 +447,14 @@ static void OnBiosPath_Changed(GtkWidget *wdg, gpointer data) {
}
void OnConf_Clicked(GtkDialog *dialog, gint arg1, gpointer user_data) {
- if (arg1 == GTK_RESPONSE_OK) {
- GetComboText(GpuConfS.Combo, GpuConfS.plist, Config.Gpu);
- GetComboText(SpuConfS.Combo, SpuConfS.plist, Config.Spu);
- GetComboText(CdrConfS.Combo, CdrConfS.plist, Config.Cdr);
- GetComboText(Pad1ConfS.Combo, Pad1ConfS.plist, Config.Pad1);
- GetComboText(Pad2ConfS.Combo, Pad2ConfS.plist, Config.Pad2);
- GetComboText(BiosConfS.Combo, BiosConfS.plist, Config.Bios);
+ GetComboText(GpuConfS.Combo, GpuConfS.plist, Config.Gpu);
+ GetComboText(SpuConfS.Combo, SpuConfS.plist, Config.Spu);
+ GetComboText(CdrConfS.Combo, CdrConfS.plist, Config.Cdr);
+ GetComboText(Pad1ConfS.Combo, Pad1ConfS.plist, Config.Pad1);
+ GetComboText(Pad2ConfS.Combo, Pad2ConfS.plist, Config.Pad2);
+ GetComboText(BiosConfS.Combo, BiosConfS.plist, Config.Bios);
- SaveConfig();
- }
+ SaveConfig();
gtk_widget_destroy(ConfDlg);
ConfDlg = NULL;
@@ -783,63 +778,61 @@ static void OnCpu_CpuClicked(GtkWidget *widget, gpointer user_data) {
}
void OnCpu_Clicked(GtkDialog *dialog, gint arg1, gpointer user_data) {
- if (arg1 == GTK_RESPONSE_OK) {
- GtkWidget *widget;
- GladeXML *xml = user_data;
- int tmp;
- long t;
-
- widget = glade_xml_get_widget(xml, "GtkCombo_PsxType");
-
- // If nothing chosen, default to NTSC
- tmp = gtk_combo_box_get_active (GTK_COMBO_BOX (widget));
- if (tmp == -1)
- tmp = PSX_TYPE_NTSC;
-
- if (!strcmp("NTSC", psxtypes[tmp]))
- Config.PsxType = PSX_TYPE_NTSC;
- else
- Config.PsxType = PSX_TYPE_PAL;
-
- Config.Xa = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_Xa")));
- Config.Sio = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_Sio")));
- Config.Mdec = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_Mdec")));
- Config.Cdda = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_CDDA")));
- Config.PsxAuto = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_PsxAuto")));
-
- t = Config.Debug;
- Config.Debug = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_Dbg")));
- if (t != Config.Debug) {
- if (Config.Debug) StartDebugger();
- else StopDebugger();
- }
+ GtkWidget *widget;
+ GladeXML *xml = user_data;
+ int tmp;
+ long t;
+
+ widget = glade_xml_get_widget(xml, "GtkCombo_PsxType");
+
+ // If nothing chosen, default to NTSC
+ tmp = gtk_combo_box_get_active (GTK_COMBO_BOX (widget));
+ if (tmp == -1)
+ tmp = PSX_TYPE_NTSC;
+
+ if (!strcmp("NTSC", psxtypes[tmp]))
+ Config.PsxType = PSX_TYPE_NTSC;
+ else
+ Config.PsxType = PSX_TYPE_PAL;
+
+ Config.Xa = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_Xa")));
+ Config.Sio = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_Sio")));
+ Config.Mdec = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_Mdec")));
+ Config.Cdda = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_CDDA")));
+ Config.PsxAuto = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_PsxAuto")));
+
+ t = Config.Debug;
+ Config.Debug = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_Dbg")));
+ if (t != Config.Debug) {
+ if (Config.Debug) StartDebugger();
+ else StopDebugger();
+ }
- t = Config.Cpu;
- Config.Cpu = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_Cpu")));
- if (t != Config.Cpu) {
- psxCpu->Shutdown();
+ t = Config.Cpu;
+ Config.Cpu = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_Cpu")));
+ if (t != Config.Cpu) {
+ psxCpu->Shutdown();
#ifdef PSXREC
- if (Config.Cpu) {
- psxCpu = &psxInt;
- }
- else psxCpu = &psxRec;
-#else
+ if (Config.Cpu) {
psxCpu = &psxInt;
+ }
+ else psxCpu = &psxRec;
+#else
+ psxCpu = &psxInt;
#endif
- if (psxCpu->Init() == -1) {
- SysClose();
- exit(1);
- }
- psxCpu->Reset();
+ if (psxCpu->Init() == -1) {
+ SysClose();
+ exit(1);
}
+ psxCpu->Reset();
+ }
- Config.PsxOut = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_PsxOut")));
- Config.SpuIrq = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_SpuIrq")));
- Config.RCntFix = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_RCntFix")));
- Config.VSyncWA = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_VSyncWA")));
+ Config.PsxOut = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_PsxOut")));
+ Config.SpuIrq = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_SpuIrq")));
+ Config.RCntFix = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_RCntFix")));
+ Config.VSyncWA = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "GtkCheckButton_VSyncWA")));
- SaveConfig();
- }
+ SaveConfig();
gtk_widget_destroy(CpuDlg);
CpuDlg = NULL;
diff --git a/plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2 b/plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2
index 02164f0c..25610e2e 100644
--- a/plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2
+++ b/plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.glade2
@@ -295,8 +295,8 @@ Threaded - Faster (With Cache)</property>
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
- <widget class="GtkButton" id="cfg_cancelbutton">
- <property name="label">gtk-cancel</property>
+ <widget class="GtkButton" id="cfg_closebutton">
+ <property name="label">gtk-close</property>
<property name="response_id">-6</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -311,23 +311,6 @@ Threaded - Faster (With Cache)</property>
<property name="position">0</property>
</packing>
</child>
- <child>
- <widget class="GtkButton" id="cfg_okbutton">
- <property name="label">gtk-ok</property>
- <property name="response_id">-5</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="receives_default">False</property>
- <property name="use_stock">True</property>
- <signal name="clicked" handler="on_cfg_okbutton_clicked"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/plugins/dfcdrom/cdrcfg-0.1df/main.c b/plugins/dfcdrom/cdrcfg-0.1df/main.c
index 9eac7ef4..55172d20 100644
--- a/plugins/dfcdrom/cdrcfg-0.1df/main.c
+++ b/plugins/dfcdrom/cdrcfg-0.1df/main.c
@@ -125,11 +125,6 @@ void fill_drives_list(GtkWidget *widget) {
}
static void OnConfigExit(GtkWidget *widget, gpointer user_data) {
- gtk_widget_destroy(widget);
- gtk_exit(0);
-}
-
-static void OnConfigOk(GtkWidget *widget, gpointer user_data) {
GladeXML *xml;
xml = glade_get_widget_tree(MainWindow);
@@ -178,14 +173,10 @@ long CDRconfigure() {
g_signal_connect_data(GTK_OBJECT(widget), "delete_event",
GTK_SIGNAL_FUNC(OnConfigExit), NULL, NULL, G_CONNECT_AFTER);
- widget = glade_xml_get_widget(xml, "cfg_cancelbutton");
+ widget = glade_xml_get_widget(xml, "cfg_closebutton");
g_signal_connect_data(GTK_OBJECT(widget), "clicked",
GTK_SIGNAL_FUNC(OnConfigExit), NULL, NULL, G_CONNECT_AFTER);
- widget = glade_xml_get_widget(xml, "cfg_okbutton");
- g_signal_connect_data(GTK_OBJECT(widget), "clicked",
- GTK_SIGNAL_FUNC(OnConfigOk), xml, NULL, G_CONNECT_AFTER);
-
widget = glade_xml_get_widget(xml, "cddev_comboboxentry");
fill_drives_list(widget);
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(widget)->child), CdromDev);
diff --git a/plugins/dfinput/cfg-gtk2.c b/plugins/dfinput/cfg-gtk2.c
index 644269ba..0434d363 100644
--- a/plugins/dfinput/cfg-gtk2.c
+++ b/plugins/dfinput/cfg-gtk2.c
@@ -255,13 +255,6 @@ static void UpdateKey() {
}
static void OnConfigExit(GtkWidget *widget, gpointer user_data) {
- gtk_widget_destroy(widget);
- SDL_Quit();
-
- gtk_exit(0);
-}
-
-static void OnConfigOk(GtkWidget *widget, gpointer user_data) {
SaveConfig();
gtk_widget_destroy(widget);
@@ -631,14 +624,10 @@ long PADconfigure() {
g_signal_connect_data(GTK_OBJECT(widget), "delete_event",
GTK_SIGNAL_FUNC(OnConfigExit), NULL, NULL, G_CONNECT_AFTER);
- widget = glade_xml_get_widget(xml, "btncancel");
+ widget = glade_xml_get_widget(xml, "btnclose");
g_signal_connect_data(GTK_OBJECT(widget), "clicked",
GTK_SIGNAL_FUNC(OnConfigExit), NULL, NULL, G_CONNECT_AFTER);
- widget = glade_xml_get_widget(xml, "btnok");
- g_signal_connect_data(GTK_OBJECT(widget), "clicked",
- GTK_SIGNAL_FUNC(OnConfigOk), xml, NULL, G_CONNECT_AFTER);
-
PopulateDevList();
UpdateKeyList();
diff --git a/plugins/dfinput/dfinput.glade2 b/plugins/dfinput/dfinput.glade2
index e7958be0..c7bdd114 100644
--- a/plugins/dfinput/dfinput.glade2
+++ b/plugins/dfinput/dfinput.glade2
@@ -463,8 +463,8 @@ Analog Pad</property>
<property name="visible">True</property>
<property name="layout_style">end</property>
<child>
- <widget class="GtkButton" id="btncancel">
- <property name="label">gtk-cancel</property>
+ <widget class="GtkButton" id="btnclose">
+ <property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -476,20 +476,6 @@ Analog Pad</property>
<property name="position">0</property>
</packing>
</child>
- <child>
- <widget class="GtkButton" id="btnok">
- <property name="label">gtk-ok</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/plugins/dfsound/spucfg-0.1df/dfsound.glade2 b/plugins/dfsound/spucfg-0.1df/dfsound.glade2
index 8d67fd4d..c071a09e 100644
--- a/plugins/dfsound/spucfg-0.1df/dfsound.glade2
+++ b/plugins/dfsound/spucfg-0.1df/dfsound.glade2
@@ -283,22 +283,8 @@ Cubic</property>
<property name="spacing">12</property>
<property name="layout_style">end</property>
<child>
- <widget class="GtkButton" id="btn_cancel">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="btn_ok">
- <property name="label">gtk-ok</property>
+ <widget class="GtkButton" id="btn_close">
+ <property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
@@ -308,7 +294,7 @@ Cubic</property>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">0</property>
</packing>
</child>
</widget>
diff --git a/plugins/dfsound/spucfg-0.1df/main.c b/plugins/dfsound/spucfg-0.1df/main.c
index 1b910372..5ae2fc67 100644
--- a/plugins/dfsound/spucfg-0.1df/main.c
+++ b/plugins/dfsound/spucfg-0.1df/main.c
@@ -18,7 +18,7 @@
#define WRITEBINARY "wb"
#define CONFIG_FILENAME "dfsound.cfg"
-void SaveConfig (GtkWidget *widget, gpointer user_datal);
+void SaveConfig(GtkWidget *widget, gpointer user_datal);
/* This function checks for the value being outside the accepted range,
and returns the appropriate boundary value */
@@ -43,16 +43,17 @@ void on_about_clicked (GtkWidget *widget, gpointer user_data)
exit (0);
}
-void on_config_clicked (GtkWidget *widget, gpointer user_data)
+void OnConfigClose(GtkWidget *widget, gpointer user_data)
{
- gtk_widget_destroy (widget);
- exit (0);
+ GladeXML *xml = (GladeXML *)user_data;
+
+ gtk_widget_destroy(glade_xml_get_widget(xml, "CfgWnd"));
+ gtk_exit(0);
}
int main(int argc, char *argv[])
{
GtkWidget *widget;
- GtkWidget *wndMain;
GladeXML *xml;
FILE *in;
char t[256];
@@ -86,7 +87,7 @@ int main(int argc, char *argv[])
gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (widget), "dfsound PCSX Sound Plugin");
gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (widget), "1.6");
gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (widget), authors);
- gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (widget), "http://home.t-online.de/home/PeteBernert/");
+ gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (widget), "http://pcsx-df.sourceforge.net/");
g_signal_connect_data(GTK_OBJECT(widget), "response",
GTK_SIGNAL_FUNC(on_about_clicked), NULL, NULL, G_CONNECT_AFTER);
@@ -103,13 +104,11 @@ int main(int argc, char *argv[])
return 255;
}
- wndMain = glade_xml_get_widget(xml, "CfgWnd");
-
strcpy(cfg, CONFIG_FILENAME);
in = fopen(cfg, READBINARY);
if (in) {
- pB = (char *) malloc(32767);
+ pB = (char *)malloc(32767);
memset(pB, 0, 32767);
len = fread(pB, 1, 32767, in);
fclose(in);
@@ -204,119 +203,56 @@ int main(int argc, char *argv[])
val = set_limit (p, len, 0, 2);
} else val = 2;
- gtk_combo_box_set_active(GTK_COMBO_BOX (glade_xml_get_widget(xml, "cbReverb2")), val);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(glade_xml_get_widget(xml, "cbReverb2")), val);
if (pB)
free(pB);
widget = glade_xml_get_widget(xml, "CfgWnd");
- g_signal_connect_data(GTK_OBJECT(widget), "delete_event",
- GTK_SIGNAL_FUNC(on_config_clicked), NULL, NULL, G_CONNECT_AFTER);
+ g_signal_connect_data(GTK_OBJECT(widget), "destroy",
+ GTK_SIGNAL_FUNC(SaveConfig), xml, NULL, 0);
- widget = glade_xml_get_widget(xml, "btn_cancel");
+ widget = glade_xml_get_widget(xml, "btn_close");
g_signal_connect_data(GTK_OBJECT(widget), "clicked",
- GTK_SIGNAL_FUNC(on_config_clicked), NULL, NULL, G_CONNECT_AFTER);
-
- widget = glade_xml_get_widget(xml, "btn_ok");
- g_signal_connect_data(GTK_OBJECT(widget), "clicked",
- GTK_SIGNAL_FUNC(SaveConfig), xml, NULL, G_CONNECT_AFTER);
+ GTK_SIGNAL_FUNC(OnConfigClose), xml, NULL, G_CONNECT_AFTER);
gtk_main();
return 0;
}
-
-
-////////////////////////////////////////////////////////////////////////////////////////////////
-
-void SetCfgVal(char *pB, char *pE, int val)
-{
- char *p, *ps, *pC;
- char t[32];
-
- sprintf(t,"%d",val);
-// printf("%s - %s - %d\n", pB, pE, val);
-
- p = strstr(pB, pE);
- if (p) {
- p = strstr(p, "=");
- if (!p)
- return;
- p++;
- while (*p && *p != '\n' && (*p < '0' || *p > '9'))
- p++;
- if (*p == 0 || *p == '\n')
- return;
- ps = p;
- while (*p >= '0' && *p <= '9')
- p++;
- pC = (char *) malloc(32767);
- strcpy(pC, p);
- strcpy(ps, t);
- strcat(pB, pC);
- free(pC);
- } else {
- strcat(pB, pE);
- strcat(pB, " = ");
- strcat(pB, t);
- strcat(pB, "\n");
- }
-
-}
-
void SaveConfig(GtkWidget *widget, gpointer user_data)
{
- FILE *in;
- GladeXML *xml;
- int len, val;
- char *pB;
- char cfg[255];
-
- pB = (char *) malloc(32767);
- memset(pB, 0, 32767);
-
- strcpy(cfg, CONFIG_FILENAME);
-
- /* ADB TODO Why do we read this in to just replace it again? */
- in = fopen(cfg, READBINARY);
- if (in) {
- len = fread(pB, 1, 32767, in);
- fclose(in);
- }
-
- xml = (GladeXML*) user_data;
-
- val = gtk_combo_box_get_active (GTK_COMBO_BOX (glade_xml_get_widget (xml, "cbVolume2")));
- SetCfgVal(pB, "\nVolume", val);
-
- val = gtk_combo_box_get_active (GTK_COMBO_BOX (glade_xml_get_widget (xml, "cbInterpolation2")));
- SetCfgVal(pB, "\nUseInterpolation", val);
-
- val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "chkXASpeed")));
- SetCfgVal(pB, "\nXAPitch", val);
+ GladeXML *xml = (GladeXML *)user_data;
+ FILE *fp;
+ int val;
+
+ fp = fopen(CONFIG_FILENAME, WRITEBINARY);
+ if (fp == NULL) {
+ fprintf(stderr, "Unable to write to configuration file %s!\n", CONFIG_FILENAME);
+ gtk_exit(0);
+ }
- val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "chkHiCompat")));
- SetCfgVal(pB, "\nHighCompMode", val);
+ val = gtk_combo_box_get_active(GTK_COMBO_BOX(glade_xml_get_widget(xml, "cbVolume2")));
+ fprintf(fp, "\nVolume = %d\n", val);
- val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "chkIRQWait")));
- SetCfgVal(pB, "\nSPUIRQWait", val);
+ val = gtk_combo_box_get_active(GTK_COMBO_BOX(glade_xml_get_widget(xml, "cbInterpolation2")));
+ fprintf(fp, "\nUseInterpolation = %d\n", val);
- val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (glade_xml_get_widget (xml, "chkDisStereo")));
- SetCfgVal(pB, "\nDisStereo", val);
+ val = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "chkXASpeed")));
+ fprintf(fp, "\nXAPitch = %d\n", val);
- val = gtk_combo_box_get_active (GTK_COMBO_BOX (glade_xml_get_widget (xml, "cbReverb2")));
- SetCfgVal(pB, "\nUseReverb", val);
+ val = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "chkHiCompat")));
+ fprintf(fp, "\nHighCompMode = %d\n", val);
- if ((in = fopen(cfg, WRITEBINARY)) != NULL) {
- fwrite(pB, strlen(pB), 1, in);
- fclose(in);
- } /* ADB TODO Error checking? */
+ val = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "chkIRQWait")));
+ fprintf(fp, "\nSPUIRQWait = %d\n", val);
- free(pB);
+ val = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(glade_xml_get_widget(xml, "chkDisStereo")));
+ fprintf(fp, "\nDisStereo = %d\n", val);
- gtk_widget_destroy (glade_xml_get_widget (xml, "CfgWnd"));
-// g_free (xml);
+ val = gtk_combo_box_get_active(GTK_COMBO_BOX(glade_xml_get_widget(xml, "cbReverb2")));
+ fprintf(fp, "\nUseReverb = %d\n", val);
- /* Close the window and exit control from the plugin */
- exit (0);
+ fclose(fp);
+ gtk_exit(0);
}
diff --git a/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2 b/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2
index d65938dc..e2ef18a5 100644
--- a/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2
+++ b/plugins/dfxvideo/gpucfg-0.1df/dfxvideo.glade2
@@ -697,22 +697,8 @@
<property name="spacing">12</property>
<property name="layout_style">end</property>
<child>
- <widget class="GtkButton" id="btn_cancel">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="btn_ok">
- <property name="label">gtk-ok</property>
+ <widget class="GtkButton" id="btn_close">
+ <property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
@@ -722,7 +708,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">0</property>
</packing>
</child>
</widget>
diff --git a/plugins/dfxvideo/gpucfg-0.1df/main.c b/plugins/dfxvideo/gpucfg-0.1df/main.c
index 9cc0b7c7..83d00327 100644
--- a/plugins/dfxvideo/gpucfg-0.1df/main.c
+++ b/plugins/dfxvideo/gpucfg-0.1df/main.c
@@ -14,7 +14,7 @@
#include <string.h>
#include <sys/stat.h>
-void SaveConfig (GtkWidget *widget, gpointer user_datal);
+void SaveConfig(GtkWidget *widget, gpointer user_datal);
#define READBINARY "rb"
#define WRITEBINARY "wb"
@@ -49,24 +49,18 @@ int set_limit (char *p, int len, int lower, int upper)
return val;
}
-void on_about_clicked (GtkWidget *widget, gpointer user_data)
+void on_about_clicked(GtkWidget *widget, gpointer user_data)
{
gtk_widget_destroy (widget);
exit (0);
}
-void on_config_clicked (GtkWidget *widget, gpointer user_data)
-{
- gtk_widget_destroy (widget);
- exit (0);
-}
-
-void set_widget_sensitive (GtkWidget *widget, gpointer user_data)
+void set_widget_sensitive(GtkWidget *widget, gpointer user_data)
{
gtk_widget_set_sensitive (widget, (int)user_data);
}
-void on_use_fixes_toggled (GtkWidget *widget, gpointer user_data)
+void on_use_fixes_toggled(GtkWidget *widget, gpointer user_data)
{
GtkWidget *check, *table_fixes;
GladeXML *xml;
@@ -80,6 +74,14 @@ void on_use_fixes_toggled (GtkWidget *widget, gpointer user_data)
(void *)gtk_toggle_button_get_active (check));
}
+void OnConfigClose(GtkWidget *widget, gpointer user_data)
+{
+ GladeXML *xml = (GladeXML *)user_data;
+
+ gtk_widget_destroy(glade_xml_get_widget(xml, "CfgWnd"));
+ gtk_exit(0);
+}
+
int
main (int argc, char *argv[])
{
@@ -118,7 +120,7 @@ main (int argc, char *argv[])
gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (widget), "P.E.Op.S PCSX Video Plugin");
gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (widget), "1.17");
gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (widget), authors);
- gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (widget), "http://home.t-online.de/home/PeteBernert/");
+ gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (widget), "http://pcsx-df.sourceforge.net/");
g_signal_connect_data(GTK_OBJECT(widget), "response",
GTK_SIGNAL_FUNC(on_about_clicked), NULL, NULL, G_CONNECT_AFTER);
@@ -282,16 +284,12 @@ main (int argc, char *argv[])
if(pB) free(pB);
widget = glade_xml_get_widget(xml, "CfgWnd");
- g_signal_connect_data(GTK_OBJECT(widget), "delete_event",
- GTK_SIGNAL_FUNC(on_config_clicked), NULL, NULL, G_CONNECT_AFTER);
+ g_signal_connect_data(GTK_OBJECT(widget), "destroy",
+ GTK_SIGNAL_FUNC(SaveConfig), xml, NULL, 0);
- widget = glade_xml_get_widget(xml, "btn_cancel");
+ widget = glade_xml_get_widget(xml, "btn_close");
g_signal_connect_data(GTK_OBJECT(widget), "clicked",
- GTK_SIGNAL_FUNC(on_config_clicked), NULL, NULL, G_CONNECT_AFTER);
-
- widget = glade_xml_get_widget(xml, "btn_ok");
- g_signal_connect_data(GTK_OBJECT(widget), "clicked",
- GTK_SIGNAL_FUNC(SaveConfig), xml, NULL, G_CONNECT_AFTER);
+ GTK_SIGNAL_FUNC(OnConfigClose), xml, NULL, G_CONNECT_AFTER);
widget = glade_xml_get_widget(xml, "checkUseFixes");
g_signal_connect_data(GTK_OBJECT(widget), "clicked",
@@ -420,9 +418,6 @@ void SaveConfig(GtkWidget *widget, gpointer user_data)
free(pB);
- gtk_widget_destroy (glade_xml_get_widget (xml, "CfgWnd"));
-// g_free (xml);
-
- /* Close the window and exit control from the plugin */
- exit (0);
+ // Close the window and exit control from the plugin
+ gtk_exit (0);
}
diff --git a/po/zh_TW.po b/po/zh_TW.po
index b0a6b82d..aee310ab 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: pcsxr 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-19 12:58+0800\n"
-"PO-Revision-Date: 2009-12-19 12:59+0700\n"
+"PO-Revision-Date: 2009-12-28 17:04+0700\n"
"Last-Translator: Wei Mingzhi <whistler@openoffice.org>\n"
"Language-Team: Traditional Chinese <whistler@openoffice.org>\n"
"MIME-Version: 1.0\n"
@@ -353,7 +353,7 @@ msgstr "內部 HLE-Bios"
#: ../win32/gui/ConfigurePlugins.c:292
msgid "Configuration not OK!"
-msgstr "配置不正確!"
+msgstr "設定不正確!"
#: ../win32/gui/ConfigurePlugins.c:292
#: ../gui/Cheat.c:156
@@ -380,7 +380,7 @@ msgstr "選擇 BIOS 目錄"
#: ../win32/gui/ConfigurePlugins.c:468
msgid "Configuration"
-msgstr "配置"
+msgstr "設定"
#: ../win32/gui/ConfigurePlugins.c:472
msgid "Graphics"
@@ -408,11 +408,11 @@ msgstr "BIOS"
#: ../win32/gui/ConfigurePlugins.c:478
msgid "Set Bios Directory"
-msgstr "設置 BIOS 目錄"
+msgstr "設定 BIOS 目錄"
#: ../win32/gui/ConfigurePlugins.c:479
msgid "Set Plugins Directory"
-msgstr "設置外掛目錄"
+msgstr "設定外掛目錄"
#: ../win32/gui/ConfigurePlugins.c:480
#: ../win32/gui/ConfigurePlugins.c:483
@@ -421,7 +421,7 @@ msgstr "設置外掛目錄"
#: ../win32/gui/ConfigurePlugins.c:492
#: ../win32/gui/ConfigurePlugins.c:604
msgid "Configure..."
-msgstr "配置..."
+msgstr "設定..."
#: ../win32/gui/ConfigurePlugins.c:481
#: ../win32/gui/ConfigurePlugins.c:484
@@ -443,7 +443,7 @@ msgstr "關於..."
#: ../win32/gui/ConfigurePlugins.c:599
msgid "NetPlay Configuration"
-msgstr "聯網遊戲配置"
+msgstr "聯網遊戲設定"
#: ../win32/gui/ConfigurePlugins.c:603
msgid "NetPlay"
@@ -819,7 +819,7 @@ msgstr "是否確認格式化此記憶卡?"
#: ../win32/gui/WndMain.c:1198
msgid "Cpu Config"
-msgstr "CPU 配置"
+msgstr "CPU 設定"
#: ../win32/gui/WndMain.c:1203
msgid "Disable Xa Decoding"
@@ -1004,7 +1004,7 @@ msgstr "記錄 1(&1)"
#: ../win32/gui/WndMain.c:1533
msgid "&Configuration"
-msgstr "配置(&C)"
+msgstr "設定(&C)"
#: ../win32/gui/WndMain.c:1534
msgid "Cheat &Search..."
@@ -1122,7 +1122,7 @@ msgstr "搜尋結果"
#: ../gui/ConfDlg.c:112
#: ../data/pcsx.glade2:764
msgid "Configure PCSX"
-msgstr "配置 PCSX"
+msgstr "設定 PCSX"
#: ../gui/ConfDlg.c:240
#: ../gui/ConfDlg.c:261
@@ -1130,7 +1130,7 @@ msgstr "配置 PCSX"
#: ../gui/ConfDlg.c:303
#: ../gui/ConfDlg.c:358
msgid "No configuration required"
-msgstr "不需要配置"
+msgstr "不需要設定"
#: ../gui/ConfDlg.c:240
#: ../gui/ConfDlg.c:261
@@ -1138,7 +1138,7 @@ msgstr "不需要配置"
#: ../gui/ConfDlg.c:303
#: ../gui/ConfDlg.c:358
msgid "This plugin doesn't need to be configured."
-msgstr "此外掛不需要被配置。"
+msgstr "此外掛不需要被設定。"
#: ../gui/ConfDlg.c:586
#, c-format
@@ -1254,7 +1254,7 @@ msgstr ""
"\t-runcd\t\t執行 CD-ROM\n"
"\t-cdfile 檔案\t執行 CD 鏡像檔\n"
"\t-nogui\t\t不開啟 GTK GUI\n"
-"\t-cfg 檔案\t加載一個特定的配置檔案 (缺省為: ~/.pcsx/pcsx.cfg)\n"
+"\t-cfg 檔案\t加載一個特定的設定檔案 (缺省為: ~/.pcsx/pcsx.cfg)\n"
"\t-psxout\t\t開啟 PSX 輸出\n"
"\t-load 編號\t加載指定編號的記錄 (1-5)\n"
"\t-h -help\t顯示此說明\n"
@@ -1263,7 +1263,7 @@ msgstr ""
#: ../gui/LnxMain.c:357
#, c-format
msgid "PCSX cannot be configured without using the GUI -- you should restart without -nogui.\n"
-msgstr "PCSX 不能在字符界面下配置 -- 請不使用 -nogui 參數重新啟動程式\n"
+msgstr "PCSX 不能在字符界面下設定 -- 請不使用 -nogui 參數重新啟動程式\n"
#: ../gui/LnxMain.c:409
msgid "Failed loading plugins!"
@@ -1879,7 +1879,7 @@ msgstr "讀取記錄(_L)"
#: ../data/pcsx.glade2:358
msgid "_Configuration"
-msgstr "配置(_C)"
+msgstr "設定(_C)"
#: ../data/pcsx.glade2:364
msgid "_Plugins & BIOS..."
@@ -1965,7 +1965,7 @@ msgstr "更換 ISO..."
#: ../data/pcsx.glade2:669
#: ../data/pcsx.glade2:1853
msgid "Configure Memory Cards"
-msgstr "配置記憶卡"
+msgstr "記憶卡設定"
#: ../data/pcsx.glade2:670
msgid "Memcards..."
@@ -1973,7 +1973,7 @@ msgstr "記憶卡..."
#: ../data/pcsx.glade2:682
msgid "Configure Graphics"
-msgstr "配置圖像"
+msgstr "圖像設定"
#: ../data/pcsx.glade2:683
msgid "Graphics..."
@@ -1982,7 +1982,7 @@ msgstr "圖像..."
#: ../data/pcsx.glade2:695
#: ../plugins/dfsound/spucfg-0.1df/dfsound.glade2:8
msgid "Configure Sound"
-msgstr "設定聲音"
+msgstr "聲音設定"
#: ../data/pcsx.glade2:696
msgid "Sound..."
@@ -1990,7 +1990,7 @@ msgstr "聲音..."
#: ../data/pcsx.glade2:708
msgid "Configure CD-ROM"
-msgstr "配置 CD-ROM"
+msgstr "CD-ROM 設定"
#: ../data/pcsx.glade2:709
msgid "CD-ROM..."
@@ -1998,7 +1998,7 @@ msgstr "CD-ROM..."
#: ../data/pcsx.glade2:721
msgid "Configure Controllers"
-msgstr "配置控制器"
+msgstr "控制器設定"
#: ../data/pcsx.glade2:722
msgid "Controllers..."
@@ -2006,11 +2006,11 @@ msgstr "控制器..."
#: ../data/pcsx.glade2:867
msgid "Select Folder to Search"
-msgstr "選擇要查找的資料夾"
+msgstr "選擇要檢索的資料夾"
#: ../data/pcsx.glade2:883
msgid "Search in:"
-msgstr "在此處查找外掛:"
+msgstr "在此處檢索外掛:"
#: ../data/pcsx.glade2:1156
msgid "Graphics:"
@@ -2042,7 +2042,7 @@ msgstr "<b>BIOS</b>"
#: ../data/pcsx.glade2:1380
msgid "Configure CPU"
-msgstr "配置 CPU"
+msgstr "CPU 設定"
#: ../data/pcsx.glade2:1427
msgid "SPU IRQ Always Enabled"
@@ -2082,7 +2082,7 @@ msgstr "<b>系統類型</b>"
#: ../data/pcsx.glade2:1698
msgid "Configure NetPlay"
-msgstr "配置聯網遊戲"
+msgstr "聯網遊戲設定"
#: ../data/pcsx.glade2:1786
msgid "<b>NetPlay</b>"