Skip to content

Commit

Permalink
* Bring pluing Linux(gtk) interfaces up to date.
Browse files Browse the repository at this point in the history
  • Loading branch information
loathingKernel committed Jul 17, 2017
1 parent aa295fe commit a96eefd
Show file tree
Hide file tree
Showing 20 changed files with 855 additions and 814 deletions.
26 changes: 23 additions & 3 deletions plugins/bladesio1/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 2 additions & 1 deletion plugins/bladesio1/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
Expand Down
26 changes: 23 additions & 3 deletions plugins/dfcdrom/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,29 @@ AM_CPPFLAGS = -DLOCALE_DIR=\"${datadir}/locale/\" \
-I$(top_srcdir)/libpcsxcore -I../../include

bin_PROGRAMS = cfgDFCdrom
cfgDFCdrom_SOURCES = cdrcfg-0.1df/main.c
cfgDFCdrom_SOURCES = cdrcfg-0.1df/main.c GtkResources.c GtkResources.h
cfgDFCdrom_LDADD = $(GTK3_LIBS)

glade_DATA = cdrcfg-0.1df/dfcdrom.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/dfcdrom">
<file>dfcdrom.ui</file>
</gresource>
</gresources>
endef

dfcdrom.gresource.xml:
$(file >$@,$(gresource_xml))
dfcdrom_gresource: dfcdrom.gresource.xml
$(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir)/cdrcfg-0.1df --generate-dependencies $(srcdir)/$<)
GtkResources.c: dfcdrom.gresource.xml $(dfcdrom_gresource)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/cdrcfg-0.1df --generate-source --c-name dfcdrom $<
GtkResources.h: dfcdrom.gresource.xml $(dfcdrom_gresource)
$(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir)/cdrcfg-0.1df --generate-header --c-name dfcdrom $<


#glade_DATA = cdrcfg-0.1df/dfcdrom.ui
#gladedir = $(datadir)/psemu/
EXTRA_DIST = $(glade_DATA)
167 changes: 85 additions & 82 deletions plugins/dfcdrom/cdrcfg-0.1df/dfcdrom.ui
Original file line number Diff line number Diff line change
@@ -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="GtkAdjustment" id="adjustmentCacheSize">
<property name="lower">32</property>
<property name="upper">2048</property>
Expand All @@ -13,6 +14,76 @@
<property name="step_increment">1</property>
<property name="page_increment">4</property>
</object>
<object class="GtkListStore" id="liststoreReadMode">
<columns>
<!-- column-name Item -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Normal (No Cache)</col>
</row>
<row>
<col id="0" translatable="yes">Threaded - Faster (With Cache)</col>
</row>
</data>
</object>
<object class="GtkListStore" id="liststoreSpindownTime">
<columns>
<!-- column-name Item -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Default</col>
</row>
<row>
<col id="0" translatable="yes">125ms</col>
</row>
<row>
<col id="0" translatable="yes">250ms</col>
</row>
<row>
<col id="0" translatable="yes">500ms</col>
</row>
<row>
<col id="0" translatable="yes">1s</col>
</row>
<row>
<col id="0" translatable="yes">2s</col>
</row>
<row>
<col id="0" translatable="yes">4s</col>
</row>
<row>
<col id="0" translatable="yes">8s</col>
</row>
<row>
<col id="0" translatable="yes">16s</col>
</row>
<row>
<col id="0" translatable="yes">32s</col>
</row>
<row>
<col id="0" translatable="yes">1min</col>
</row>
<row>
<col id="0" translatable="yes">2min</col>
</row>
<row>
<col id="0" translatable="yes">4min</col>
</row>
<row>
<col id="0" translatable="yes">8min</col>
</row>
<row>
<col id="0" translatable="yes">16min</col>
</row>
<row>
<col id="0" translatable="yes">32min</col>
</row>
</data>
</object>
<object class="GtkDialog" id="CfgWnd">
<property name="visible">True</property>
<property name="can_focus">False</property>
Expand Down Expand Up @@ -58,16 +129,17 @@
</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>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<child>
<object class="GtkHBox" id="hbox5">
<object class="GtkBox" id="hbox5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
Expand Down Expand Up @@ -104,11 +176,12 @@
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<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>
<child>
<object class="GtkHBox" id="hbox1">
<object class="GtkBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
Expand All @@ -117,8 +190,8 @@
<object class="GtkLabel" id="readmode_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Select read mode:</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
Expand Down Expand Up @@ -152,7 +225,7 @@
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox2">
<object class="GtkBox" id="hbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
Expand All @@ -161,8 +234,8 @@
<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">Cache Size (Def. 64):</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
Expand Down Expand Up @@ -195,7 +268,7 @@
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox4">
<object class="GtkBox" id="hbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
Expand All @@ -204,8 +277,8 @@
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Spindown Time:</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
Expand Down Expand Up @@ -240,7 +313,7 @@
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox3">
<object class="GtkBox" id="hbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">5</property>
Expand All @@ -249,8 +322,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">Cdrom Speed (Def. 0 = MAX):</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
Expand Down Expand Up @@ -321,74 +394,4 @@
<action-widget response="-6">cfg_closebutton</action-widget>
</action-widgets>
</object>
<object class="GtkListStore" id="liststoreReadMode">
<columns>
<!-- column-name Item -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Normal (No Cache)</col>
</row>
<row>
<col id="0" translatable="yes">Threaded - Faster (With Cache)</col>
</row>
</data>
</object>
<object class="GtkListStore" id="liststoreSpindownTime">
<columns>
<!-- column-name Item -->
<column type="gchararray"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Default</col>
</row>
<row>
<col id="0" translatable="yes">125ms</col>
</row>
<row>
<col id="0" translatable="yes">250ms</col>
</row>
<row>
<col id="0" translatable="yes">500ms</col>
</row>
<row>
<col id="0" translatable="yes">1s</col>
</row>
<row>
<col id="0" translatable="yes">2s</col>
</row>
<row>
<col id="0" translatable="yes">4s</col>
</row>
<row>
<col id="0" translatable="yes">8s</col>
</row>
<row>
<col id="0" translatable="yes">16s</col>
</row>
<row>
<col id="0" translatable="yes">32s</col>
</row>
<row>
<col id="0" translatable="yes">1min</col>
</row>
<row>
<col id="0" translatable="yes">2min</col>
</row>
<row>
<col id="0" translatable="yes">4min</col>
</row>
<row>
<col id="0" translatable="yes">8min</col>
</row>
<row>
<col id="0" translatable="yes">16min</col>
</row>
<row>
<col id="0" translatable="yes">32min</col>
</row>
</data>
</object>
</interface>
7 changes: 4 additions & 3 deletions plugins/dfcdrom/cdrcfg-0.1df/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ long CDRconfigure() {

builder = gtk_builder_new();

if (!gtk_builder_add_from_file(builder, DATADIR "dfcdrom.ui", NULL)) {
if (!gtk_builder_add_from_resource(builder, "/org/pcsxr/dfcdrom/dfcdrom.ui", NULL)) {
g_warning("We could not load the interface!");
return 0;
}
Expand Down Expand Up @@ -256,6 +256,7 @@ void CDRabout() {
"Wei Mingzhi <[email protected]>", NULL};

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), "CD-ROM Device Reader");
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(widget), "1.0");
gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(widget), authors);
Expand All @@ -276,13 +277,13 @@ int main(int argc, char *argv[]) {
gtk_init(&argc, &argv);

if (argc < 2) {
printf ("Usage: cfgBladeSio1 {about | configure}\n");
printf ("Usage: cfgDFCdrom {about | configure}\n");
return 0;
}

if (strcmp(argv[1], "configure") != 0 &&
strcmp(argv[1], "about") != 0) {
printf ("Usage: cfgBladeSio1 {about | configure}\n");
printf ("Usage: cfgDFCdrom {about | configure}\n");
return 0;
}

Expand Down
Loading

0 comments on commit a96eefd

Please sign in to comment.