From a96eefdf0f10a9a051e65f6e88a24dc3abe40fc5 Mon Sep 17 00:00:00 2001 From: Stelios Tsampas Date: Mon, 17 Jul 2017 17:32:35 +0300 Subject: * Bring pluing Linux(gtk) interfaces up to date. --- plugins/dfnet/Makefile.am | 26 +++++++++++++++++++++++--- plugins/dfnet/dfnet.ui | 41 ++++++++++++++++++++++------------------- plugins/dfnet/gui.c | 3 ++- 3 files changed, 47 insertions(+), 23 deletions(-) mode change 100755 => 100644 plugins/dfnet/dfnet.ui (limited to 'plugins/dfnet') diff --git a/plugins/dfnet/Makefile.am b/plugins/dfnet/Makefile.am index d639c652..4000b8c4 100755 --- a/plugins/dfnet/Makefile.am +++ b/plugins/dfnet/Makefile.am @@ -12,9 +12,29 @@ AM_CPPFLAGS = -DLOCALE_DIR=\"${datadir}/locale/\" \ -I$(top_srcdir)/libpcsxcore -I../../include bin_PROGRAMS = cfgDFNet -cfgDFNet_SOURCES = gui.c +cfgDFNet_SOURCES = gui.c GtkResources.c GtkResources.h cfgDFNet_LDADD = $(GTK3_LIBS) -glade_DATA = dfnet.ui -gladedir = $(datadir)/psemu/ +# gresource.xml is dynamically generated in CMake. Mirror that here in a static way. +define gresource_xml = + + + + dfnet.ui + + +endef + +dfnet.gresource.xml: + $(file >$@,$(gresource_xml)) +dfnet_gresource: dfnet.gresource.xml + $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/$<) +GtkResources.c: dfnet.gresource.xml $(dfnet_gresource) + $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name dfnet $< +GtkResources.h: dfnet.gresource.xml $(dfnet_gresource) + $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header --c-name dfnet $< + + +#glade_DATA = dfnet.ui +#gladedir = $(datadir)/psemu/ EXTRA_DIST = $(glade_DATA) diff --git a/plugins/dfnet/dfnet.ui b/plugins/dfnet/dfnet.ui old mode 100755 new mode 100644 index bdad3a1d..7ab884c2 --- a/plugins/dfnet/dfnet.ui +++ b/plugins/dfnet/dfnet.ui @@ -1,6 +1,7 @@ + - + False 5 @@ -25,7 +26,7 @@ True True - + True False @@ -44,8 +45,8 @@ True False - 0 Start Game + 0 True @@ -68,7 +69,7 @@ True True - + True False @@ -87,8 +88,8 @@ True False - 0 Play Offline + 0 True @@ -114,9 +115,10 @@ - + True False + vertical 12 @@ -136,20 +138,18 @@ If you selected Client please enter the IP address the Server gave to you in the - + True False - 2 - 2 - 8 12 + 8 True True True - + True False @@ -168,8 +168,8 @@ If you selected Client please enter the IP address the Server gave to you in the True False - 0 Copy PC IP to Clipboard + 0 True @@ -182,7 +182,7 @@ If you selected Client please enter the IP address the Server gave to you in the 1 - 2 + 0 @@ -195,9 +195,7 @@ If you selected Client please enter the IP address the Server gave to you in the 1 - 2 1 - 2 @@ -210,6 +208,10 @@ If you selected Client please enter the IP address the Server gave to you in the True True + + 0 + 0 + @@ -223,8 +225,8 @@ If you selected Client please enter the IP address the Server gave to you in the rbServer + 0 1 - 2 @@ -236,9 +238,10 @@ If you selected Client please enter the IP address the Server gave to you in the - + True False + vertical 6 @@ -254,15 +257,15 @@ If you selected Client please enter the IP address the Server gave to you in the - + True False True False - 0 Port Number + 0 True diff --git a/plugins/dfnet/gui.c b/plugins/dfnet/gui.c index 06c4b888..85d0871f 100755 --- a/plugins/dfnet/gui.c +++ b/plugins/dfnet/gui.c @@ -103,7 +103,7 @@ long CFGopen() { builder = gtk_builder_new(); - if (!gtk_builder_add_from_file(builder, DATADIR "dfnet.ui", NULL)) { + if (!gtk_builder_add_from_resource(builder, "/org/pcsxr/dfnet/dfnet.ui", NULL)) { g_warning("We could not load the interface!"); return 0; } @@ -182,6 +182,7 @@ void CFGabout() { GtkWidget *widget; widget = gtk_about_dialog_new(); + gtk_about_dialog_set_logo_icon_name (GTK_ABOUT_DIALOG(widget), "help-about"); gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(widget), "Socket NetPlay Driver"); gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(widget), "0.21"); gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(widget), authors); -- cgit v1.2.3