From 43ebdb1bf5a2634299d7e277cb5fc0a6ced7b447 Mon Sep 17 00:00:00 2001 From: "SND\\edgbla_cp" Date: Tue, 27 Aug 2013 19:27:08 +0000 Subject: small gtk gui fix; git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@86978 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- data/pcsxr.ui | 41 +++++++++++++++++++++++++++++++++++++---- gui/AboutDlg.c | 17 ++++++++++++++--- gui/LnxMain.c | 4 +--- 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 @@ + + False + 5 + True + center-on-parent + dialog + pcsxr + + + False + vertical + 2 + + + False + end + + + False + True + end + 0 + + + + + + + + False 5 Edit Cheat Codes True - center + center-on-parent dialog @@ -203,7 +233,7 @@ Cheat Search False True - center + center-on-parent dialog @@ -751,6 +781,7 @@ Configure PCSXR False True + center-on-parent dialog @@ -1562,6 +1593,7 @@ Configure CPU False True + center-on-parent dialog @@ -1910,7 +1942,6 @@ False PCSXR False - center pcsxr-icon.png @@ -2695,6 +2726,7 @@ False Configure Memory Cards True + center-on-parent 688 400 dialog @@ -3504,7 +3536,7 @@ Memory Dump False True - center + center-on-parent dialog @@ -3782,6 +3814,7 @@ Configure NetPlay False True + center-on-parent dialog 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(); -- cgit v1.2.3