diff options
| author | SND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2012-11-20 21:01:10 +0000 |
|---|---|---|
| committer | SND\edgbla_cp <SND\edgbla_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2012-11-20 21:01:10 +0000 |
| commit | 5883ee6487832da502dd004bf6a06085d50c30ed (patch) | |
| tree | cc2dbb4bdeeab95122d625d15c33a3a93f5f9851 /plugins/dfnet | |
| parent | aae41a8f9e07d449dc3bce6f9b8d1e7ad54025d1 (diff) | |
| download | pcsxr-5883ee6487832da502dd004bf6a06085d50c30ed.tar.gz | |
gtk3 (thanks to Rafał Mużyło);
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@81326 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins/dfnet')
| -rwxr-xr-x | plugins/dfnet/Makefile.am | 4 | ||||
| -rwxr-xr-x | plugins/dfnet/dfnet.ui | 234 | ||||
| -rwxr-xr-x | plugins/dfnet/gui.c | 5 |
3 files changed, 143 insertions, 100 deletions
diff --git a/plugins/dfnet/Makefile.am b/plugins/dfnet/Makefile.am index 835e82a3..004df634 100755 --- a/plugins/dfnet/Makefile.am +++ b/plugins/dfnet/Makefile.am @@ -8,12 +8,12 @@ libDFNet_la_LDFLAGS = -module -avoid-version AM_CPPFLAGS = -DLOCALE_DIR=\"${datadir}/locale/\" \ -DDATADIR=\"${datadir}/psemu/\" \ - $(GTK2_CFLAGS) \ + $(GTK3_CFLAGS) \ -I../../libpcsxcore -I../../include bin_PROGRAMS = cfgDFNet cfgDFNet_SOURCES = gui.c -cfgDFNet_LDADD = $(GTK2_LIBS) +cfgDFNet_LDADD = $(GTK3_LIBS) glade_DATA = dfnet.ui gladedir = $(datadir)/psemu/ diff --git a/plugins/dfnet/dfnet.ui b/plugins/dfnet/dfnet.ui index 957c449c..bdad3a1d 100755 --- a/plugins/dfnet/dfnet.ui +++ b/plugins/dfnet/dfnet.ui @@ -1,27 +1,127 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="UTF-8"?> <interface> - <!-- interface-requires gtk+ 2.16 --> - <!-- interface-naming-policy project-wide --> + <!-- interface-requires gtk+ 3.0 --> <object class="GtkDialog" id="dlgStart"> + <property name="can_focus">False</property> <property name="border_width">5</property> <property name="resizable">False</property> <property name="modal">True</property> <property name="window_position">center</property> <property name="type_hint">normal</property> - <property name="has_separator">False</property> <child internal-child="vbox"> - <object class="GtkVBox" id="dialog-vbox1"> + <object class="GtkBox" id="dialog-vbox1"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="orientation">vertical</property> <property name="spacing">5</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="btnStart"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <child> + <object class="GtkHBox" id="hbox3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkImage" id="image2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="stock">gtk-network</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <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> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="btnOffline"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <child> + <object class="GtkHBox" id="hbox4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkImage" id="image3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="stock">gtk-no</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">0</property> + </packing> + </child> + <child> + <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> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">False</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> <child> <object class="GtkVBox" id="vbox1"> <property name="visible">True</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> <property name="spacing">12</property> <child> <object class="GtkLabel" id="label1"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="label" translatable="yes">Select here if you'll be Server (Player1) or Client (Player2). If you select Server you must Copy your IP address to the Clipboard and paste if (Ctrl+V) wherever the Client can see it. @@ -30,12 +130,15 @@ If you selected Client please enter the IP address the Server gave to you in the <property name="wrap">True</property> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> <child> <object class="GtkTable" 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> @@ -48,9 +151,11 @@ If you selected Client please enter the IP address the Server gave to you in the <child> <object class="GtkHBox" id="hbox2"> <property name="visible">True</property> + <property name="can_focus">False</property> <child> <object class="GtkImage" id="image1"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="stock">gtk-copy</property> </object> <packing> @@ -62,9 +167,13 @@ If you selected Client please enter the IP address the Server gave to you in the <child> <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> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> @@ -81,8 +190,8 @@ If you selected Client please enter the IP address the Server gave to you in the <property name="visible">True</property> <property name="can_focus">True</property> <property name="max_length">15</property> - <property name="invisible_char">●</property> - <signal name="activate" handler="on_tbServerIP_activate"/> + <property name="invisible_char">●</property> + <signal name="activate" handler="on_tbServerIP_activate" swapped="no"/> </object> <packing> <property name="left_attach">1</property> @@ -97,6 +206,7 @@ If you selected Client please enter the IP address the Server gave to you in the <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="xalign">0</property> <property name="active">True</property> <property name="draw_indicator">True</property> </object> @@ -107,6 +217,7 @@ If you selected Client please enter the IP address the Server gave to you in the <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">False</property> + <property name="xalign">0</property> <property name="active">True</property> <property name="draw_indicator">True</property> <property name="group">rbServer</property> @@ -118,6 +229,8 @@ If you selected Client please enter the IP address the Server gave to you in the </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="padding">2</property> <property name="position">1</property> </packing> @@ -125,27 +238,35 @@ If you selected Client please enter the IP address the Server gave to you in the <child> <object class="GtkVBox" id="vbox2"> <property name="visible">True</property> - <property name="orientation">vertical</property> + <property name="can_focus">False</property> <property name="spacing">6</property> <child> <object class="GtkLabel" id="label2"> <property name="visible">True</property> + <property name="can_focus">False</property> <property name="label" translatable="yes">Do not change if not necessary (remember it must be changed on both sides).</property> <property name="wrap">True</property> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> <child> <object class="GtkHBox" 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> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">0</property> </packing> </child> @@ -154,110 +275,33 @@ If you selected Client please enter the IP address the Server gave to you in the <property name="visible">True</property> <property name="can_focus">True</property> <property name="max_length">5</property> - <property name="invisible_char">●</property> + <property name="invisible_char">●</property> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">1</property> </packing> </child> </object> <packing> + <property name="expand">True</property> + <property name="fill">True</property> <property name="position">2</property> </packing> </child> </object> <packing> - <property name="position">1</property> - </packing> - </child> - <child internal-child="action_area"> - <object class="GtkHButtonBox" id="dialog-action_area1"> - <property name="visible">True</property> - <property name="layout_style">end</property> - <child> - <object class="GtkButton" id="btnStart"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <child> - <object class="GtkHBox" id="hbox3"> - <property name="visible">True</property> - <child> - <object class="GtkImage" id="image2"> - <property name="visible">True</property> - <property name="stock">gtk-network</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label5"> - <property name="visible">True</property> - <property name="label" translatable="yes">Start Game</property> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkButton" id="btnOffline"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> - <child> - <object class="GtkHBox" id="hbox4"> - <property name="visible">True</property> - <child> - <object class="GtkImage" id="image3"> - <property name="visible">True</property> - <property name="stock">gtk-no</property> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="label6"> - <property name="visible">True</property> - <property name="label" translatable="yes">Play Offline</property> - </object> - <packing> - <property name="position">1</property> - </packing> - </child> - </object> - </child> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">False</property> - <property name="position">1</property> - </packing> - </child> - </object> - <packing> <property name="expand">False</property> - <property name="pack_type">end</property> - <property name="position">0</property> + <property name="fill">True</property> + <property name="position">1</property> </packing> </child> </object> diff --git a/plugins/dfnet/gui.c b/plugins/dfnet/gui.c index b1438995..7dbb5642 100755 --- a/plugins/dfnet/gui.c +++ b/plugins/dfnet/gui.c @@ -112,7 +112,7 @@ long CFGopen() { gtk_window_set_title(GTK_WINDOW(MainWindow), _("NetPlay")); widget = gtk_builder_get_object(builder, "btnCopyIP"); - g_signal_connect_data(GTK_OBJECT(widget), "clicked", + g_signal_connect_data(G_OBJECT(widget), "clicked", G_CALLBACK(OnCopyIP), NULL, NULL, G_CONNECT_AFTER); widget = gtk_builder_get_object(builder, "tbServerIP"); @@ -182,7 +182,7 @@ void CFGabout() { GtkWidget *widget; widget = gtk_about_dialog_new(); - gtk_about_dialog_set_name(GTK_ABOUT_DIALOG(widget), "Socket NetPlay Driver"); + 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); gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(widget), "http://www.codeplex.com/pcsxr/"); @@ -212,7 +212,6 @@ int main(int argc, char *argv[]) { textdomain(GETTEXT_PACKAGE); #endif - gtk_set_locale(); gtk_init(&argc, &argv); if (!strcmp(argv[1], "configure")) { |
