summaryrefslogtreecommitdiff
path: root/plugins/dfnet
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/dfnet
parentaa295feb0d95d75f10f4ac097fdb1139428e1220 (diff)
downloadpcsxr-a96eefdf0f10a9a051e65f6e88a24dc3abe40fc5.tar.gz
* Bring pluing Linux(gtk) interfaces up to date.
Diffstat (limited to 'plugins/dfnet')
-rwxr-xr-xplugins/dfnet/Makefile.am26
-rw-r--r--[-rwxr-xr-x]plugins/dfnet/dfnet.ui41
-rwxr-xr-xplugins/dfnet/gui.c3
3 files changed, 47 insertions, 23 deletions
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 =
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/pcsxr/dfnet">
+ <file>dfnet.ui</file>
+ </gresource>
+</gresources>
+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
index bdad3a1d..7ab884c2 100755..100644
--- a/plugins/dfnet/dfnet.ui
+++ b/plugins/dfnet/dfnet.ui
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.19.0 -->
<interface>
- <!-- interface-requires gtk+ 3.0 -->
+ <requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="dlgStart">
<property name="can_focus">False</property>
<property name="border_width">5</property>
@@ -25,7 +26,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
- <object class="GtkHBox" id="hbox3">
+ <object class="GtkBox" id="hbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -44,8 +45,8 @@
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Start Game</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
@@ -68,7 +69,7 @@
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
- <object class="GtkHBox" id="hbox4">
+ <object class="GtkBox" id="hbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -87,8 +88,8 @@
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Play Offline</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
@@ -114,9 +115,10 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox1">
+ <object class="GtkBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkLabel" id="label1">
@@ -136,20 +138,18 @@ If you selected Client please enter the IP address the Server gave to you in the
</packing>
</child>
<child>
- <object class="GtkTable" id="table1">
+ <object class="GtkGrid" id="table1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">8</property>
<property name="row_spacing">12</property>
+ <property name="column_spacing">8</property>
<child>
<object class="GtkButton" id="btnCopyIP">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
- <object class="GtkHBox" id="hbox2">
+ <object class="GtkBox" id="hbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -168,8 +168,8 @@ If you selected Client please enter the IP address the Server gave to you in the
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Copy PC IP to Clipboard</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
@@ -182,7 +182,7 @@ If you selected Client please enter the IP address the Server gave to you in the
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
</packing>
</child>
<child>
@@ -195,9 +195,7 @@ If you selected Client please enter the IP address the Server gave to you in the
</object>
<packing>
<property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
</packing>
</child>
<child>
@@ -210,6 +208,10 @@ If you selected Client please enter the IP address the Server gave to you in the
<property name="active">True</property>
<property name="draw_indicator">True</property>
</object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
</child>
<child>
<object class="GtkRadioButton" id="rbClient">
@@ -223,8 +225,8 @@ If you selected Client please enter the IP address the Server gave to you in the
<property name="group">rbServer</property>
</object>
<packing>
+ <property name="left_attach">0</property>
<property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
</packing>
</child>
</object>
@@ -236,9 +238,10 @@ If you selected Client please enter the IP address the Server gave to you in the
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox2">
+ <object class="GtkBox" id="vbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="GtkLabel" id="label2">
@@ -254,15 +257,15 @@ If you selected Client please enter the IP address the Server gave to you in the
</packing>
</child>
<child>
- <object class="GtkHBox" id="hbox1">
+ <object class="GtkBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes">Port Number</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
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);