summaryrefslogtreecommitdiff
path: root/plugins/bladesio1
diff options
context:
space:
mode:
authorStelios Tsampas <loathingkernel@gmail.com>2017-07-17 17:32:35 +0300
committerStelios Tsampas <loathingkernel@gmail.com>2017-07-17 17:32:35 +0300
commita96eefdf0f10a9a051e65f6e88a24dc3abe40fc5 (patch)
treec12847ff994c574a588f7b79a5720f322b9133ef /plugins/bladesio1
parentaa295feb0d95d75f10f4ac097fdb1139428e1220 (diff)
downloadpcsxr-a96eefdf0f10a9a051e65f6e88a24dc3abe40fc5.tar.gz
* Bring pluing Linux(gtk) interfaces up to date.
Diffstat (limited to 'plugins/bladesio1')
-rw-r--r--plugins/bladesio1/Makefile.am26
-rw-r--r--plugins/bladesio1/gui.c3
2 files changed, 25 insertions, 4 deletions
diff --git a/plugins/bladesio1/Makefile.am b/plugins/bladesio1/Makefile.am
index 9e0b6ab5..880aa647 100644
--- a/plugins/bladesio1/Makefile.am
+++ b/plugins/bladesio1/Makefile.am
@@ -12,9 +12,29 @@ AM_CPPFLAGS = -DLOCALE_DIR=\"${datadir}/locale/\" \
-I$(top_srcdir)/libpcsxcore -I../../include
bin_PROGRAMS = cfgBladeSio1
-cfgBladeSio1_SOURCES = gui.c sio1.h
+cfgBladeSio1_SOURCES = gui.c sio1.h GtkResources.c GtkResources.h
cfgBladeSio1_LDADD = $(GTK3_LIBS)
-glade_DATA = sio1.ui
-gladedir = $(datadir)/psemu/
+# gresource.xml is dynamically generated in CMake. Mirror that here in a static way.
+define gresource_xml =
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/pcsxr/bladesio1">
+ <file>sio1.ui</file>
+ </gresource>
+</gresources>
+endef
+
+bladesio1.gresource.xml:
+ $(file >$@,$(gresource_xml))
+bladesio1_gresource: bladesio1.gresource.xml
+ $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/$<)
+GtkResources.c: bladesio1.gresource.xml $(bladesio1_gresource)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name bladesio1 $<
+GtkResources.h: bladesio1.gresource.xml $(bladesio1_gresource)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header --c-name bladesio1 $<
+
+
+#glade_DATA = sio1.ui
+#gladedir = $(datadir)/psemu/
EXTRA_DIST = $(glade_DATA)
diff --git a/plugins/bladesio1/gui.c b/plugins/bladesio1/gui.c
index 99979f15..37ffb83f 100644
--- a/plugins/bladesio1/gui.c
+++ b/plugins/bladesio1/gui.c
@@ -103,7 +103,7 @@ void configure() {
builder = gtk_builder_new();
- if(!gtk_builder_add_from_file(builder, DATADIR "sio1.ui", NULL))
+ if(!gtk_builder_add_from_resource(builder, "/org/pcsxr/bladesio1/sio1.ui", NULL))
g_warning("We could not load the interface!");
settingsRead();
@@ -166,6 +166,7 @@ void about() {
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), "Link Cable");
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(widget), "1.0");
gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(widget), authors);