summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-08-27 19:27:08 +0000
committerSND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-08-27 19:27:08 +0000
commit43ebdb1bf5a2634299d7e277cb5fc0a6ced7b447 (patch)
treefc0be6b3c64d860bd3201a04edc408112978cd06
parentf831a964c1dd594200cbd9189ec7ac7a8b1017f8 (diff)
downloadpcsxr-43ebdb1bf5a2634299d7e277cb5fc0a6ced7b447.tar.gz
small gtk gui fix;
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@86978 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rw-r--r--data/pcsxr.ui41
-rwxr-xr-xgui/AboutDlg.c17
-rwxr-xr-xgui/LnxMain.c4
3 files changed, 52 insertions, 10 deletions
diff --git a/data/pcsxr.ui b/data/pcsxr.ui
index 62d0830c..5ac053e6 100644
--- a/data/pcsxr.ui
+++ b/data/pcsxr.ui
@@ -15,12 +15,42 @@
<source stock-id="generated-icon-cd-png" filename="cd.png"/>
</sources>
</object>
+ <object class="GtkAboutDialog" id="AboutDlg">
+ <property name="can_focus">False</property>
+ <property name="border_width">5</property>
+ <property name="modal">True</property>
+ <property name="window_position">center-on-parent</property>
+ <property name="type_hint">dialog</property>
+ <property name="program_name">pcsxr</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="aboutdialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">2</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="aboutdialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ </child>
+ </object>
<object class="GtkDialog" id="CheatListDlg">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Edit Cheat Codes</property>
<property name="modal">True</property>
- <property name="window_position">center</property>
+ <property name="window_position">center-on-parent</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox7">
@@ -203,7 +233,7 @@
<property name="title" translatable="yes">Cheat Search</property>
<property name="resizable">False</property>
<property name="modal">True</property>
- <property name="window_position">center</property>
+ <property name="window_position">center-on-parent</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox8">
@@ -751,6 +781,7 @@
<property name="title" translatable="yes">Configure PCSXR</property>
<property name="resizable">False</property>
<property name="modal">True</property>
+ <property name="window_position">center-on-parent</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox4">
@@ -1562,6 +1593,7 @@
<property name="title" translatable="yes">Configure CPU</property>
<property name="resizable">False</property>
<property name="modal">True</property>
+ <property name="window_position">center-on-parent</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
@@ -1910,7 +1942,6 @@
<property name="can_focus">False</property>
<property name="title" translatable="yes">PCSXR</property>
<property name="resizable">False</property>
- <property name="window_position">center</property>
<property name="icon_name">pcsxr-icon.png</property>
<signal name="destroy" handler="OnDestroy" swapped="no"/>
<child>
@@ -2695,6 +2726,7 @@
<property name="can_focus">False</property>
<property name="title" translatable="yes">Configure Memory Cards</property>
<property name="modal">True</property>
+ <property name="window_position">center-on-parent</property>
<property name="default_width">688</property>
<property name="default_height">400</property>
<property name="type_hint">dialog</property>
@@ -3504,7 +3536,7 @@
<property name="title" translatable="yes">Memory Dump</property>
<property name="resizable">False</property>
<property name="modal">True</property>
- <property name="window_position">center</property>
+ <property name="window_position">center-on-parent</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox9">
@@ -3782,6 +3814,7 @@
<property name="title" translatable="yes">Configure NetPlay</property>
<property name="resizable">False</property>
<property name="modal">True</property>
+ <property name="window_position">center-on-parent</property>
<property name="type_hint">dialog</property>
<signal name="destroy" handler="OnNet_Cancel" swapped="no"/>
<child internal-child="vbox">
diff --git a/gui/AboutDlg.c b/gui/AboutDlg.c
index 56474f89..f39daf0d 100755
--- a/gui/AboutDlg.c
+++ b/gui/AboutDlg.c
@@ -22,6 +22,7 @@
#define ABOUT_VERSION "svn"
void RunAboutDialog(void) {
+ GtkBuilder *builder;
GtkWidget *AboutDlg;
const gchar *authors[] = {
@@ -87,8 +88,16 @@ void RunAboutDialog(void) {
"along with this program; if not, write to the Free Software "
"Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.");
- AboutDlg = gtk_about_dialog_new();
- gtk_window_set_resizable(GTK_WINDOW(AboutDlg), TRUE);
+ 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;
+ }
+
+ AboutDlg = GTK_WIDGET(gtk_builder_get_object(builder, "AboutDlg"));
+
+ gtk_window_set_title(GTK_WINDOW(AboutDlg), _("About"));
gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(AboutDlg), "PCSX-Reloaded");
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(AboutDlg), ABOUT_VERSION);
gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(AboutDlg), "http://pcsxr.codeplex.com/");
@@ -101,7 +110,9 @@ void RunAboutDialog(void) {
gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG (AboutDlg), _("A PlayStation emulator."));
gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(AboutDlg), _(license));
gtk_about_dialog_set_wrap_license(GTK_ABOUT_DIALOG(AboutDlg), TRUE);
-
+
gtk_dialog_run(GTK_DIALOG(AboutDlg));
gtk_widget_destroy(AboutDlg);
+
+ g_object_unref(builder);
}
diff --git a/gui/LnxMain.c b/gui/LnxMain.c
index e9b042c2..023785e6 100755
--- a/gui/LnxMain.c
+++ b/gui/LnxMain.c
@@ -354,7 +354,7 @@ int main(int argc, char *argv[]) {
strcpy(Config.Net, "Disabled");
- if (UseGui) gtk_init(NULL, NULL);
+ if (UseGui) gtk_init(&argc, &argv);
CheckSubDir();
ScanAllPlugins();
@@ -378,8 +378,6 @@ int main(int argc, char *argv[]) {
strcpy(Config.PluginsDir, str_plugin_dir);
g_free(str_plugin_dir);
- gtk_init(NULL, NULL);
-
// Update available plugins, but not GUI
UpdatePluginsBIOS();