mirror of https://github.com/PCSX2/pcsx2.git
Linux: Work on dialog boxes for a bunch of plugins. mostly null plugins. Not finished, by any means, but this seemed like a good commit point.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1189 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
9390d5583a
commit
5615929ce3
|
@ -2036,7 +2036,7 @@ create_ConfDlg (void)
|
||||||
GtkWidget *hbuttonbox24;
|
GtkWidget *hbuttonbox24;
|
||||||
GtkWidget *GtkButton_FWconfigure;
|
GtkWidget *GtkButton_FWconfigure;
|
||||||
GtkWidget *GtkButton_FWtest;
|
GtkWidget *GtkButton_FWtest;
|
||||||
GtkWidget *GtkButton_FireWireabout;
|
GtkWidget *GtkButton_FWabout;
|
||||||
GtkWidget *label30;
|
GtkWidget *label30;
|
||||||
GtkWidget *GtkLabel_Bios;
|
GtkWidget *GtkLabel_Bios;
|
||||||
GtkWidget *hbox5;
|
GtkWidget *hbox5;
|
||||||
|
@ -2385,11 +2385,11 @@ create_ConfDlg (void)
|
||||||
gtk_container_add (GTK_CONTAINER (hbuttonbox24), GtkButton_FWtest);
|
gtk_container_add (GTK_CONTAINER (hbuttonbox24), GtkButton_FWtest);
|
||||||
GTK_WIDGET_SET_FLAGS (GtkButton_FWtest, GTK_CAN_DEFAULT);
|
GTK_WIDGET_SET_FLAGS (GtkButton_FWtest, GTK_CAN_DEFAULT);
|
||||||
|
|
||||||
GtkButton_FireWireabout = gtk_button_new_with_mnemonic (_("About"));
|
GtkButton_FWabout = gtk_button_new_with_mnemonic (_("About"));
|
||||||
gtk_widget_set_name (GtkButton_FireWireabout, "GtkButton_FireWireabout");
|
gtk_widget_set_name (GtkButton_FWabout, "GtkButton_FWabout");
|
||||||
gtk_widget_show (GtkButton_FireWireabout);
|
gtk_widget_show (GtkButton_FWabout);
|
||||||
gtk_container_add (GTK_CONTAINER (hbuttonbox24), GtkButton_FireWireabout);
|
gtk_container_add (GTK_CONTAINER (hbuttonbox24), GtkButton_FWabout);
|
||||||
GTK_WIDGET_SET_FLAGS (GtkButton_FireWireabout, GTK_CAN_DEFAULT);
|
GTK_WIDGET_SET_FLAGS (GtkButton_FWabout, GTK_CAN_DEFAULT);
|
||||||
|
|
||||||
label30 = gtk_label_new (_("FireWire"));
|
label30 = gtk_label_new (_("FireWire"));
|
||||||
gtk_widget_set_name (label30, "label30");
|
gtk_widget_set_name (label30, "label30");
|
||||||
|
@ -2518,7 +2518,7 @@ create_ConfDlg (void)
|
||||||
g_signal_connect ((gpointer) GtkButton_FWtest, "clicked",
|
g_signal_connect ((gpointer) GtkButton_FWtest, "clicked",
|
||||||
G_CALLBACK (OnConfButton),
|
G_CALLBACK (OnConfButton),
|
||||||
NULL);
|
NULL);
|
||||||
g_signal_connect ((gpointer) GtkButton_FireWireabout, "clicked",
|
g_signal_connect ((gpointer) GtkButton_FWabout, "clicked",
|
||||||
G_CALLBACK (OnConfButton),
|
G_CALLBACK (OnConfButton),
|
||||||
NULL);
|
NULL);
|
||||||
g_signal_connect ((gpointer) GtkButton_SelectPluginsDir, "clicked",
|
g_signal_connect ((gpointer) GtkButton_SelectPluginsDir, "clicked",
|
||||||
|
@ -2585,7 +2585,7 @@ create_ConfDlg (void)
|
||||||
GLADE_HOOKUP_OBJECT (ConfDlg, hbuttonbox24, "hbuttonbox24");
|
GLADE_HOOKUP_OBJECT (ConfDlg, hbuttonbox24, "hbuttonbox24");
|
||||||
GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_FWconfigure, "GtkButton_FWconfigure");
|
GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_FWconfigure, "GtkButton_FWconfigure");
|
||||||
GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_FWtest, "GtkButton_FWtest");
|
GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_FWtest, "GtkButton_FWtest");
|
||||||
GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_FireWireabout, "GtkButton_FireWireabout");
|
GLADE_HOOKUP_OBJECT (ConfDlg, GtkButton_FWabout, "GtkButton_FWabout");
|
||||||
GLADE_HOOKUP_OBJECT (ConfDlg, label30, "label30");
|
GLADE_HOOKUP_OBJECT (ConfDlg, label30, "label30");
|
||||||
GLADE_HOOKUP_OBJECT (ConfDlg, GtkLabel_Bios, "GtkLabel_Bios");
|
GLADE_HOOKUP_OBJECT (ConfDlg, GtkLabel_Bios, "GtkLabel_Bios");
|
||||||
GLADE_HOOKUP_OBJECT (ConfDlg, hbox5, "hbox5");
|
GLADE_HOOKUP_OBJECT (ConfDlg, hbox5, "hbox5");
|
||||||
|
|
|
@ -4413,7 +4413,7 @@ Configure them here.</b></property>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkButton" id="GtkButton_FireWireabout">
|
<widget class="GtkButton" id="GtkButton_FWabout">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_default">True</property>
|
<property name="can_default">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "CDVD.h"
|
#include "CDVD.h"
|
||||||
|
|
||||||
const char *LibName = "CDVDnull Driver";
|
const char *LibName = "CDVDnull Driver";
|
||||||
|
|
|
@ -46,7 +46,7 @@ void SysMessage(const char *fmt, ...)
|
||||||
|
|
||||||
MsgDlg = gtk_window_new(GTK_WINDOW_POPUP);
|
MsgDlg = gtk_window_new(GTK_WINDOW_POPUP);
|
||||||
gtk_window_set_position(GTK_WINDOW(MsgDlg), GTK_WIN_POS_CENTER);
|
gtk_window_set_position(GTK_WINDOW(MsgDlg), GTK_WIN_POS_CENTER);
|
||||||
gtk_window_set_title(GTK_WINDOW(MsgDlg), "SPU2null Msg");
|
gtk_window_set_title(GTK_WINDOW(MsgDlg), "CDVDnull Msg");
|
||||||
gtk_container_set_border_width(GTK_CONTAINER(MsgDlg), 5);
|
gtk_container_set_border_width(GTK_CONTAINER(MsgDlg), 5);
|
||||||
|
|
||||||
Box = gtk_vbox_new(5, 0);
|
Box = gtk_vbox_new(5, 0);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* FWnull
|
/* CDVDnull
|
||||||
* Copyright (C) 2004-2009 PCSX2 Team
|
* Copyright (C) 2002-2009 Pcsx2 Team
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
|
@ -0,0 +1,34 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
#include "callbacks.h"
|
||||||
|
#include "interface.h"
|
||||||
|
#include "support.h"
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
OnConf_Ok (GtkButton *button,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
OnConf_Cancel (GtkButton *button,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
OnAbout_Ok (GtkButton *button,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
OnConf_Ok (GtkButton *button,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
OnConf_Cancel (GtkButton *button,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
OnAbout_Ok (GtkButton *button,
|
||||||
|
gpointer user_data);
|
|
@ -0,0 +1,173 @@
|
||||||
|
/*
|
||||||
|
* DO NOT EDIT THIS FILE - it is generated by Glade.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <gdk/gdkkeysyms.h>
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
#include "callbacks.h"
|
||||||
|
#include "interface.h"
|
||||||
|
#include "support.h"
|
||||||
|
|
||||||
|
#define GLADE_HOOKUP_OBJECT(component,widget,name) \
|
||||||
|
g_object_set_data_full (G_OBJECT (component), name, \
|
||||||
|
gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
|
||||||
|
|
||||||
|
#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
|
||||||
|
g_object_set_data (G_OBJECT (component), name, widget)
|
||||||
|
|
||||||
|
GtkWidget*
|
||||||
|
create_Config (void)
|
||||||
|
{
|
||||||
|
GtkWidget *Config;
|
||||||
|
GtkWidget *vbox1;
|
||||||
|
GtkWidget *frame3;
|
||||||
|
GtkWidget *alignment1;
|
||||||
|
GtkWidget *check_logging;
|
||||||
|
GtkWidget *label15;
|
||||||
|
GtkWidget *hbuttonbox1;
|
||||||
|
GtkWidget *button1;
|
||||||
|
GtkWidget *button2;
|
||||||
|
|
||||||
|
Config = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
|
gtk_widget_set_name (Config, "Config");
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (Config), 5);
|
||||||
|
gtk_window_set_title (GTK_WINDOW (Config), _("CDVDconfig"));
|
||||||
|
|
||||||
|
vbox1 = gtk_vbox_new (FALSE, 5);
|
||||||
|
gtk_widget_set_name (vbox1, "vbox1");
|
||||||
|
gtk_widget_show (vbox1);
|
||||||
|
gtk_container_add (GTK_CONTAINER (Config), vbox1);
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (vbox1), 5);
|
||||||
|
|
||||||
|
frame3 = gtk_frame_new (NULL);
|
||||||
|
gtk_widget_set_name (frame3, "frame3");
|
||||||
|
gtk_widget_show (frame3);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox1), frame3, TRUE, TRUE, 0);
|
||||||
|
gtk_frame_set_shadow_type (GTK_FRAME (frame3), GTK_SHADOW_NONE);
|
||||||
|
|
||||||
|
alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1);
|
||||||
|
gtk_widget_set_name (alignment1, "alignment1");
|
||||||
|
gtk_widget_show (alignment1);
|
||||||
|
gtk_container_add (GTK_CONTAINER (frame3), alignment1);
|
||||||
|
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment1), 0, 0, 12, 0);
|
||||||
|
|
||||||
|
check_logging = gtk_check_button_new_with_mnemonic (_("Enable Logging"));
|
||||||
|
gtk_widget_set_name (check_logging, "check_logging");
|
||||||
|
gtk_widget_show (check_logging);
|
||||||
|
gtk_container_add (GTK_CONTAINER (alignment1), check_logging);
|
||||||
|
|
||||||
|
label15 = gtk_label_new (_("<b>Logging</b>"));
|
||||||
|
gtk_widget_set_name (label15, "label15");
|
||||||
|
gtk_widget_show (label15);
|
||||||
|
gtk_frame_set_label_widget (GTK_FRAME (frame3), label15);
|
||||||
|
gtk_label_set_use_markup (GTK_LABEL (label15), TRUE);
|
||||||
|
|
||||||
|
hbuttonbox1 = gtk_hbutton_box_new ();
|
||||||
|
gtk_widget_set_name (hbuttonbox1, "hbuttonbox1");
|
||||||
|
gtk_widget_show (hbuttonbox1);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, TRUE, TRUE, 0);
|
||||||
|
gtk_box_set_spacing (GTK_BOX (hbuttonbox1), 30);
|
||||||
|
|
||||||
|
button1 = gtk_button_new_with_mnemonic (_("Ok"));
|
||||||
|
gtk_widget_set_name (button1, "button1");
|
||||||
|
gtk_widget_show (button1);
|
||||||
|
gtk_container_add (GTK_CONTAINER (hbuttonbox1), button1);
|
||||||
|
GTK_WIDGET_SET_FLAGS (button1, GTK_CAN_DEFAULT);
|
||||||
|
|
||||||
|
button2 = gtk_button_new_with_mnemonic (_("Cancel"));
|
||||||
|
gtk_widget_set_name (button2, "button2");
|
||||||
|
gtk_widget_show (button2);
|
||||||
|
gtk_container_add (GTK_CONTAINER (hbuttonbox1), button2);
|
||||||
|
GTK_WIDGET_SET_FLAGS (button2, GTK_CAN_DEFAULT);
|
||||||
|
|
||||||
|
g_signal_connect ((gpointer) button1, "clicked",
|
||||||
|
G_CALLBACK (OnConf_Ok),
|
||||||
|
NULL);
|
||||||
|
g_signal_connect ((gpointer) button2, "clicked",
|
||||||
|
G_CALLBACK (OnConf_Cancel),
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
/* Store pointers to all widgets, for use by lookup_widget(). */
|
||||||
|
GLADE_HOOKUP_OBJECT_NO_REF (Config, Config, "Config");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, vbox1, "vbox1");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, frame3, "frame3");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, alignment1, "alignment1");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, check_logging, "check_logging");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, label15, "label15");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, hbuttonbox1, "hbuttonbox1");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, button1, "button1");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, button2, "button2");
|
||||||
|
|
||||||
|
return Config;
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkWidget*
|
||||||
|
create_About (void)
|
||||||
|
{
|
||||||
|
GtkWidget *About;
|
||||||
|
GtkWidget *vbox2;
|
||||||
|
GtkWidget *label2;
|
||||||
|
GtkWidget *label3;
|
||||||
|
GtkWidget *hbuttonbox2;
|
||||||
|
GtkWidget *button3;
|
||||||
|
|
||||||
|
About = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
|
gtk_widget_set_name (About, "About");
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (About), 5);
|
||||||
|
gtk_window_set_title (GTK_WINDOW (About), _("CDVDabout"));
|
||||||
|
|
||||||
|
vbox2 = gtk_vbox_new (FALSE, 5);
|
||||||
|
gtk_widget_set_name (vbox2, "vbox2");
|
||||||
|
gtk_widget_show (vbox2);
|
||||||
|
gtk_container_add (GTK_CONTAINER (About), vbox2);
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 5);
|
||||||
|
|
||||||
|
label2 = gtk_label_new (_("CDVD Null Driver"));
|
||||||
|
gtk_widget_set_name (label2, "label2");
|
||||||
|
gtk_widget_show (label2);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox2), label2, FALSE, FALSE, 0);
|
||||||
|
gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_CENTER);
|
||||||
|
|
||||||
|
label3 = gtk_label_new (_("Original Author: (Not sure. linuzappz?)\nRevised by arcum42@gmail.com"));
|
||||||
|
gtk_widget_set_name (label3, "label3");
|
||||||
|
gtk_widget_show (label3);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox2), label3, FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
hbuttonbox2 = gtk_hbutton_box_new ();
|
||||||
|
gtk_widget_set_name (hbuttonbox2, "hbuttonbox2");
|
||||||
|
gtk_widget_show (hbuttonbox2);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox2), hbuttonbox2, TRUE, TRUE, 0);
|
||||||
|
gtk_box_set_spacing (GTK_BOX (hbuttonbox2), 30);
|
||||||
|
|
||||||
|
button3 = gtk_button_new_with_mnemonic (_("Ok"));
|
||||||
|
gtk_widget_set_name (button3, "button3");
|
||||||
|
gtk_widget_show (button3);
|
||||||
|
gtk_container_add (GTK_CONTAINER (hbuttonbox2), button3);
|
||||||
|
GTK_WIDGET_SET_FLAGS (button3, GTK_CAN_DEFAULT);
|
||||||
|
|
||||||
|
g_signal_connect ((gpointer) button3, "clicked",
|
||||||
|
G_CALLBACK (OnAbout_Ok),
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
/* Store pointers to all widgets, for use by lookup_widget(). */
|
||||||
|
GLADE_HOOKUP_OBJECT_NO_REF (About, About, "About");
|
||||||
|
GLADE_HOOKUP_OBJECT (About, vbox2, "vbox2");
|
||||||
|
GLADE_HOOKUP_OBJECT (About, label2, "label2");
|
||||||
|
GLADE_HOOKUP_OBJECT (About, label3, "label3");
|
||||||
|
GLADE_HOOKUP_OBJECT (About, hbuttonbox2, "hbuttonbox2");
|
||||||
|
GLADE_HOOKUP_OBJECT (About, button3, "button3");
|
||||||
|
|
||||||
|
return About;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
/*
|
||||||
|
* DO NOT EDIT THIS FILE - it is generated by Glade.
|
||||||
|
*/
|
||||||
|
|
||||||
|
GtkWidget* create_Config (void);
|
||||||
|
GtkWidget* create_About (void);
|
|
@ -0,0 +1,144 @@
|
||||||
|
/*
|
||||||
|
* DO NOT EDIT THIS FILE - it is generated by Glade.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
#include "support.h"
|
||||||
|
|
||||||
|
GtkWidget*
|
||||||
|
lookup_widget (GtkWidget *widget,
|
||||||
|
const gchar *widget_name)
|
||||||
|
{
|
||||||
|
GtkWidget *parent, *found_widget;
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
if (GTK_IS_MENU (widget))
|
||||||
|
parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
|
||||||
|
else
|
||||||
|
parent = widget->parent;
|
||||||
|
if (!parent)
|
||||||
|
parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey");
|
||||||
|
if (parent == NULL)
|
||||||
|
break;
|
||||||
|
widget = parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
|
||||||
|
widget_name);
|
||||||
|
if (!found_widget)
|
||||||
|
g_warning ("Widget not found: %s", widget_name);
|
||||||
|
return found_widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
static GList *pixmaps_directories = NULL;
|
||||||
|
|
||||||
|
/* Use this function to set the directory containing installed pixmaps. */
|
||||||
|
void
|
||||||
|
add_pixmap_directory (const gchar *directory)
|
||||||
|
{
|
||||||
|
pixmaps_directories = g_list_prepend (pixmaps_directories,
|
||||||
|
g_strdup (directory));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This is an internally used function to find pixmap files. */
|
||||||
|
static gchar*
|
||||||
|
find_pixmap_file (const gchar *filename)
|
||||||
|
{
|
||||||
|
GList *elem;
|
||||||
|
|
||||||
|
/* We step through each of the pixmaps directory to find it. */
|
||||||
|
elem = pixmaps_directories;
|
||||||
|
while (elem)
|
||||||
|
{
|
||||||
|
gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
|
||||||
|
G_DIR_SEPARATOR_S, filename);
|
||||||
|
if (g_file_test (pathname, G_FILE_TEST_EXISTS))
|
||||||
|
return pathname;
|
||||||
|
g_free (pathname);
|
||||||
|
elem = elem->next;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This is an internally used function to create pixmaps. */
|
||||||
|
GtkWidget*
|
||||||
|
create_pixmap (GtkWidget *widget,
|
||||||
|
const gchar *filename)
|
||||||
|
{
|
||||||
|
gchar *pathname = NULL;
|
||||||
|
GtkWidget *pixmap;
|
||||||
|
|
||||||
|
if (!filename || !filename[0])
|
||||||
|
return gtk_image_new ();
|
||||||
|
|
||||||
|
pathname = find_pixmap_file (filename);
|
||||||
|
|
||||||
|
if (!pathname)
|
||||||
|
{
|
||||||
|
g_warning (_("Couldn't find pixmap file: %s"), filename);
|
||||||
|
return gtk_image_new ();
|
||||||
|
}
|
||||||
|
|
||||||
|
pixmap = gtk_image_new_from_file (pathname);
|
||||||
|
g_free (pathname);
|
||||||
|
return pixmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This is an internally used function to create pixmaps. */
|
||||||
|
GdkPixbuf*
|
||||||
|
create_pixbuf (const gchar *filename)
|
||||||
|
{
|
||||||
|
gchar *pathname = NULL;
|
||||||
|
GdkPixbuf *pixbuf;
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
|
if (!filename || !filename[0])
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
pathname = find_pixmap_file (filename);
|
||||||
|
|
||||||
|
if (!pathname)
|
||||||
|
{
|
||||||
|
g_warning (_("Couldn't find pixmap file: %s"), filename);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
|
||||||
|
if (!pixbuf)
|
||||||
|
{
|
||||||
|
fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
|
||||||
|
pathname, error->message);
|
||||||
|
g_error_free (error);
|
||||||
|
}
|
||||||
|
g_free (pathname);
|
||||||
|
return pixbuf;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This is used to set ATK action descriptions. */
|
||||||
|
void
|
||||||
|
glade_set_atk_action_description (AtkAction *action,
|
||||||
|
const gchar *action_name,
|
||||||
|
const gchar *description)
|
||||||
|
{
|
||||||
|
gint n_actions, i;
|
||||||
|
|
||||||
|
n_actions = atk_action_get_n_actions (action);
|
||||||
|
for (i = 0; i < n_actions; i++)
|
||||||
|
{
|
||||||
|
if (!strcmp (atk_action_get_name (action, i), action_name))
|
||||||
|
atk_action_set_description (action, i, description);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
/*
|
||||||
|
* DO NOT EDIT THIS FILE - it is generated by Glade.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Standard gettext macros.
|
||||||
|
*/
|
||||||
|
#ifdef ENABLE_NLS
|
||||||
|
# include <libintl.h>
|
||||||
|
# undef _
|
||||||
|
# define _(String) dgettext (PACKAGE, String)
|
||||||
|
# define Q_(String) g_strip_context ((String), gettext (String))
|
||||||
|
# ifdef gettext_noop
|
||||||
|
# define N_(String) gettext_noop (String)
|
||||||
|
# else
|
||||||
|
# define N_(String) (String)
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define textdomain(String) (String)
|
||||||
|
# define gettext(String) (String)
|
||||||
|
# define dgettext(Domain,Message) (Message)
|
||||||
|
# define dcgettext(Domain,Message,Type) (Message)
|
||||||
|
# define bindtextdomain(Domain,Directory) (Domain)
|
||||||
|
# define _(String) (String)
|
||||||
|
# define Q_(String) g_strip_context ((String), (String))
|
||||||
|
# define N_(String) (String)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Public Functions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This function returns a widget in a component created by Glade.
|
||||||
|
* Call it with the toplevel widget in the component (i.e. a window/dialog),
|
||||||
|
* or alternatively any widget in the component, and the name of the widget
|
||||||
|
* you want returned.
|
||||||
|
*/
|
||||||
|
GtkWidget* lookup_widget (GtkWidget *widget,
|
||||||
|
const gchar *widget_name);
|
||||||
|
|
||||||
|
|
||||||
|
/* Use this function to set the directory containing installed pixmaps. */
|
||||||
|
void add_pixmap_directory (const gchar *directory);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Private Functions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* This is used to create the pixmaps used in the interface. */
|
||||||
|
GtkWidget* create_pixmap (GtkWidget *widget,
|
||||||
|
const gchar *filename);
|
||||||
|
|
||||||
|
/* This is used to create the pixbufs used in the interface. */
|
||||||
|
GdkPixbuf* create_pixbuf (const gchar *filename);
|
||||||
|
|
||||||
|
/* This is used to set ATK action descriptions. */
|
||||||
|
void glade_set_atk_action_description (AtkAction *action,
|
||||||
|
const gchar *action_name,
|
||||||
|
const gchar *description);
|
||||||
|
|
|
@ -29,10 +29,12 @@ const unsigned char revision = 0;
|
||||||
const unsigned char build = 5; // increase that with each version
|
const unsigned char build = 5; // increase that with each version
|
||||||
|
|
||||||
static char *libraryName = "FWnull Driver";
|
static char *libraryName = "FWnull Driver";
|
||||||
|
string s_strIniPath="inis/FWnull.ini";
|
||||||
|
|
||||||
s8 *fwregs;
|
s8 *fwregs;
|
||||||
FILE *fwLog;
|
FILE *fwLog;
|
||||||
Config conf;
|
Config conf;
|
||||||
string s_strIniPath="inis/FWnull.ini";
|
|
||||||
void (*FWirq)();
|
void (*FWirq)();
|
||||||
|
|
||||||
EXPORT_C_(u32) PS2EgetLibType()
|
EXPORT_C_(u32) PS2EgetLibType()
|
||||||
|
|
|
@ -51,7 +51,7 @@ void OnMsg_Ok()
|
||||||
gtk_main_quit();
|
gtk_main_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void cfgSysMessage(char *fmt, ...)
|
void SysMessage(char *fmt, ...)
|
||||||
{
|
{
|
||||||
GtkWidget *Ok,*Txt;
|
GtkWidget *Ok,*Txt;
|
||||||
GtkWidget *Box,*Box1;
|
GtkWidget *Box,*Box1;
|
||||||
|
@ -92,21 +92,23 @@ void cfgSysMessage(char *fmt, ...)
|
||||||
|
|
||||||
gtk_main();
|
gtk_main();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnAbout_Ok(GtkButton *button, gpointer user_data)
|
void OnAbout_Ok(GtkButton *button, gpointer user_data)
|
||||||
{
|
{
|
||||||
gtk_widget_destroy(About);
|
gtk_widget_destroy(About);
|
||||||
gtk_main_quit();
|
gtk_main_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFGabout()
|
EXPORT_C_(void) FWabout()
|
||||||
{
|
{
|
||||||
About = create_About();
|
About = create_About();
|
||||||
gtk_widget_show_all(About);
|
gtk_widget_show_all(About);
|
||||||
gtk_main();
|
gtk_main();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnConf_Ok(GtkButton *button, gpointer user_data) {
|
void OnConf_Ok(GtkButton *button, gpointer user_data)
|
||||||
|
{
|
||||||
|
conf.Log = is_checked(Conf, "check_logging");
|
||||||
SaveConfig();
|
SaveConfig();
|
||||||
|
|
||||||
gtk_widget_destroy(Conf);
|
gtk_widget_destroy(Conf);
|
||||||
|
@ -119,36 +121,16 @@ void OnConf_Cancel(GtkButton *button, gpointer user_data)
|
||||||
gtk_main_quit();
|
gtk_main_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFGconfigure()
|
EXPORT_C_(void) FWconfigure()
|
||||||
{
|
{
|
||||||
|
LoadConfig();
|
||||||
Conf = create_Config();
|
Conf = create_Config();
|
||||||
|
|
||||||
LoadConfig();
|
set_checked(Conf, "check_logging", conf.Log);
|
||||||
|
|
||||||
gtk_widget_show_all(Conf);
|
gtk_widget_show_all(Conf);
|
||||||
gtk_main();
|
gtk_main();
|
||||||
}
|
}
|
||||||
|
|
||||||
long CFGmessage(char *msg) {
|
|
||||||
cfgSysMessage(msg);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*int main(int argc, char *argv[]) {
|
|
||||||
gtk_init(NULL, NULL);
|
|
||||||
|
|
||||||
if (!strcmp(argv[1], "configure")) {
|
|
||||||
CFGconfigure();
|
|
||||||
} else if (!strcmp(argv[1], "about")) {
|
|
||||||
CFGabout();
|
|
||||||
} else if (!strcmp(argv[1], "message")) {
|
|
||||||
CFGmessage(argv[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
void LoadConfig()
|
void LoadConfig()
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
@ -162,6 +144,7 @@ void LoadConfig()
|
||||||
SaveConfig();//save and return
|
SaveConfig();//save and return
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
fscanf(f, "logging = %hhx\n", &conf.Log);
|
||||||
//fscanf(f, "options = %hhx\n", &confOptions);
|
//fscanf(f, "options = %hhx\n", &confOptions);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
@ -175,10 +158,10 @@ void SaveConfig()
|
||||||
f = fopen(cfg,"w");
|
f = fopen(cfg,"w");
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
{
|
{
|
||||||
printf("failed to open %s\n", s_strIniPath.c_str());
|
printf("failed to open '%s'\n", s_strIniPath.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
fprintf(f, "logging = %hhx\n", conf.Log);
|
||||||
//fprintf(f, "options = %hhx\n", confOptions);
|
//fprintf(f, "options = %hhx\n", confOptions);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
|
|
||||||
void SaveConf();
|
void SaveConf();
|
||||||
void LoadConf();
|
void LoadConf();
|
||||||
|
void SysMessage(char *fmt, ...);
|
||||||
|
|
||||||
extern long CFGmessage(char *msg);
|
#define is_checked(main_widget, widget_name) (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(main_widget, widget_name))))
|
||||||
extern void CFGconfigure();
|
#define set_checked(main_widget,widget_name, state) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(main_widget, widget_name)), state)
|
||||||
extern void cfgSysMessage(char *fmt, ...);
|
|
||||||
extern void CFGabout();
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<widget class="GtkWindow" id="Config">
|
<widget class="GtkWindow" id="Config">
|
||||||
<property name="border_width">5</property>
|
<property name="border_width">5</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="title" translatable="yes">DEV9config</property>
|
<property name="title" translatable="yes">FWconfig</property>
|
||||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||||
<property name="modal">False</property>
|
<property name="modal">False</property>
|
||||||
|
@ -27,240 +27,37 @@
|
||||||
<property name="homogeneous">False</property>
|
<property name="homogeneous">False</property>
|
||||||
<property name="spacing">5</property>
|
<property name="spacing">5</property>
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkFrame" id="frame2">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label_xalign">0</property>
|
|
||||||
<property name="label_yalign">0.5</property>
|
|
||||||
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkHBox" id="hbox1">
|
|
||||||
<property name="border_width">5</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="homogeneous">True</property>
|
|
||||||
<property name="spacing">5</property>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="label4">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">Device:</property>
|
|
||||||
<property name="use_underline">False</property>
|
|
||||||
<property name="use_markup">False</property>
|
|
||||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
|
||||||
<property name="wrap">False</property>
|
|
||||||
<property name="selectable">False</property>
|
|
||||||
<property name="xalign">0.5</property>
|
|
||||||
<property name="yalign">0.5</property>
|
|
||||||
<property name="xpad">0</property>
|
|
||||||
<property name="ypad">0</property>
|
|
||||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
|
||||||
<property name="width_chars">-1</property>
|
|
||||||
<property name="single_line_mode">False</property>
|
|
||||||
<property name="angle">0</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkCombo" id="GtkCombo_Eth">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="value_in_list">False</property>
|
|
||||||
<property name="allow_empty">True</property>
|
|
||||||
<property name="case_sensitive">False</property>
|
|
||||||
<property name="enable_arrow_keys">True</property>
|
|
||||||
<property name="enable_arrows_always">False</property>
|
|
||||||
|
|
||||||
<child internal-child="entry">
|
|
||||||
<widget class="GtkEntry" id="combo-entry1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="editable">True</property>
|
|
||||||
<property name="visibility">True</property>
|
|
||||||
<property name="max_length">0</property>
|
|
||||||
<property name="text" translatable="yes"></property>
|
|
||||||
<property name="has_frame">True</property>
|
|
||||||
<property name="invisible_char">*</property>
|
|
||||||
<property name="activates_default">False</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child internal-child="list">
|
|
||||||
<widget class="GtkList" id="convertwidget1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkListItem" id="convertwidget2">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="convertwidget3">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes"></property>
|
|
||||||
<property name="use_underline">False</property>
|
|
||||||
<property name="use_markup">False</property>
|
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
|
||||||
<property name="wrap">False</property>
|
|
||||||
<property name="selectable">False</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="yalign">0.5</property>
|
|
||||||
<property name="xpad">0</property>
|
|
||||||
<property name="ypad">0</property>
|
|
||||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
|
||||||
<property name="width_chars">-1</property>
|
|
||||||
<property name="single_line_mode">False</property>
|
|
||||||
<property name="angle">0</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="label1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">Ethernet</property>
|
|
||||||
<property name="use_underline">False</property>
|
|
||||||
<property name="use_markup">False</property>
|
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
|
||||||
<property name="wrap">False</property>
|
|
||||||
<property name="selectable">False</property>
|
|
||||||
<property name="xalign">0.5</property>
|
|
||||||
<property name="yalign">0.5</property>
|
|
||||||
<property name="xpad">0</property>
|
|
||||||
<property name="ypad">0</property>
|
|
||||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
|
||||||
<property name="width_chars">-1</property>
|
|
||||||
<property name="single_line_mode">False</property>
|
|
||||||
<property name="angle">0</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="type">label_item</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkFrame" id="frame3">
|
<widget class="GtkFrame" id="frame3">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label_xalign">0</property>
|
<property name="label_xalign">0</property>
|
||||||
<property name="label_yalign">0.5</property>
|
<property name="label_yalign">0.5</property>
|
||||||
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkHBox" id="hbox2">
|
<widget class="GtkAlignment" id="alignment1">
|
||||||
<property name="border_width">5</property>
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="homogeneous">True</property>
|
<property name="xalign">0.5</property>
|
||||||
<property name="spacing">5</property>
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xscale">1</property>
|
||||||
|
<property name="yscale">1</property>
|
||||||
|
<property name="top_padding">0</property>
|
||||||
|
<property name="bottom_padding">0</property>
|
||||||
|
<property name="left_padding">12</property>
|
||||||
|
<property name="right_padding">0</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="label5">
|
<widget class="GtkCheckButton" id="check_logging">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Device:</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="use_underline">False</property>
|
<property name="label" translatable="yes">Enable Logging</property>
|
||||||
<property name="use_markup">False</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
<property name="wrap">False</property>
|
<property name="focus_on_click">True</property>
|
||||||
<property name="selectable">False</property>
|
<property name="active">False</property>
|
||||||
<property name="xalign">0.5</property>
|
<property name="inconsistent">False</property>
|
||||||
<property name="yalign">0.5</property>
|
<property name="draw_indicator">True</property>
|
||||||
<property name="xpad">0</property>
|
|
||||||
<property name="ypad">0</property>
|
|
||||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
|
||||||
<property name="width_chars">-1</property>
|
|
||||||
<property name="single_line_mode">False</property>
|
|
||||||
<property name="angle">0</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkCombo" id="GtkCombo_Hdd">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="value_in_list">False</property>
|
|
||||||
<property name="allow_empty">True</property>
|
|
||||||
<property name="case_sensitive">False</property>
|
|
||||||
<property name="enable_arrow_keys">True</property>
|
|
||||||
<property name="enable_arrows_always">False</property>
|
|
||||||
|
|
||||||
<child internal-child="entry">
|
|
||||||
<widget class="GtkEntry" id="entry1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="editable">True</property>
|
|
||||||
<property name="visibility">True</property>
|
|
||||||
<property name="max_length">0</property>
|
|
||||||
<property name="text" translatable="yes"></property>
|
|
||||||
<property name="has_frame">True</property>
|
|
||||||
<property name="invisible_char">*</property>
|
|
||||||
<property name="activates_default">False</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child internal-child="list">
|
|
||||||
<widget class="GtkList" id="convertwidget4">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkListItem" id="convertwidget5">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="convertwidget6">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes"></property>
|
|
||||||
<property name="use_underline">False</property>
|
|
||||||
<property name="use_markup">False</property>
|
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
|
||||||
<property name="wrap">False</property>
|
|
||||||
<property name="selectable">False</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="yalign">0.5</property>
|
|
||||||
<property name="xpad">0</property>
|
|
||||||
<property name="ypad">0</property>
|
|
||||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
|
||||||
<property name="width_chars">-1</property>
|
|
||||||
<property name="single_line_mode">False</property>
|
|
||||||
<property name="angle">0</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
|
@ -268,9 +65,9 @@
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="label15">
|
<widget class="GtkLabel" id="label15">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Hdd</property>
|
<property name="label" translatable="yes"><b>Logging</b></property>
|
||||||
<property name="use_underline">False</property>
|
<property name="use_underline">False</property>
|
||||||
<property name="use_markup">False</property>
|
<property name="use_markup">True</property>
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
<property name="wrap">False</property>
|
<property name="wrap">False</property>
|
||||||
<property name="selectable">False</property>
|
<property name="selectable">False</property>
|
||||||
|
@ -340,7 +137,7 @@
|
||||||
<widget class="GtkWindow" id="About">
|
<widget class="GtkWindow" id="About">
|
||||||
<property name="border_width">5</property>
|
<property name="border_width">5</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="title" translatable="yes">DEV9about</property>
|
<property name="title" translatable="yes">FWabout</property>
|
||||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||||
<property name="modal">False</property>
|
<property name="modal">False</property>
|
||||||
|
@ -389,7 +186,8 @@
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="label3">
|
<widget class="GtkLabel" id="label3">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Author: linuzappz <linuzappz@hotmail.com></property>
|
<property name="label" translatable="yes">Original Author: linuzappz <linuzappz@hotmail.com>
|
||||||
|
Revised by arcum42@gmail.com</property>
|
||||||
<property name="use_underline">False</property>
|
<property name="use_underline">False</property>
|
||||||
<property name="use_markup">False</property>
|
<property name="use_markup">False</property>
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
|
|
@ -31,19 +31,9 @@ create_Config (void)
|
||||||
{
|
{
|
||||||
GtkWidget *Config;
|
GtkWidget *Config;
|
||||||
GtkWidget *vbox1;
|
GtkWidget *vbox1;
|
||||||
GtkWidget *frame2;
|
|
||||||
GtkWidget *hbox1;
|
|
||||||
GtkWidget *label4;
|
|
||||||
GtkWidget *GtkCombo_Eth;
|
|
||||||
GList *GtkCombo_Eth_items = NULL;
|
|
||||||
GtkWidget *combo_entry1;
|
|
||||||
GtkWidget *label1;
|
|
||||||
GtkWidget *frame3;
|
GtkWidget *frame3;
|
||||||
GtkWidget *hbox2;
|
GtkWidget *alignment1;
|
||||||
GtkWidget *label5;
|
GtkWidget *check_logging;
|
||||||
GtkWidget *GtkCombo_Hdd;
|
|
||||||
GList *GtkCombo_Hdd_items = NULL;
|
|
||||||
GtkWidget *entry1;
|
|
||||||
GtkWidget *label15;
|
GtkWidget *label15;
|
||||||
GtkWidget *hbuttonbox1;
|
GtkWidget *hbuttonbox1;
|
||||||
GtkWidget *button1;
|
GtkWidget *button1;
|
||||||
|
@ -52,7 +42,7 @@ create_Config (void)
|
||||||
Config = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
Config = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
gtk_widget_set_name (Config, "Config");
|
gtk_widget_set_name (Config, "Config");
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (Config), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (Config), 5);
|
||||||
gtk_window_set_title (GTK_WINDOW (Config), _("DEV9config"));
|
gtk_window_set_title (GTK_WINDOW (Config), _("FWconfig"));
|
||||||
|
|
||||||
vbox1 = gtk_vbox_new (FALSE, 5);
|
vbox1 = gtk_vbox_new (FALSE, 5);
|
||||||
gtk_widget_set_name (vbox1, "vbox1");
|
gtk_widget_set_name (vbox1, "vbox1");
|
||||||
|
@ -60,77 +50,28 @@ create_Config (void)
|
||||||
gtk_container_add (GTK_CONTAINER (Config), vbox1);
|
gtk_container_add (GTK_CONTAINER (Config), vbox1);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vbox1), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (vbox1), 5);
|
||||||
|
|
||||||
frame2 = gtk_frame_new (NULL);
|
|
||||||
gtk_widget_set_name (frame2, "frame2");
|
|
||||||
gtk_widget_show (frame2);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox1), frame2, TRUE, TRUE, 0);
|
|
||||||
|
|
||||||
hbox1 = gtk_hbox_new (TRUE, 5);
|
|
||||||
gtk_widget_set_name (hbox1, "hbox1");
|
|
||||||
gtk_widget_show (hbox1);
|
|
||||||
gtk_container_add (GTK_CONTAINER (frame2), hbox1);
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (hbox1), 5);
|
|
||||||
|
|
||||||
label4 = gtk_label_new (_("Device:"));
|
|
||||||
gtk_widget_set_name (label4, "label4");
|
|
||||||
gtk_widget_show (label4);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox1), label4, FALSE, FALSE, 0);
|
|
||||||
gtk_label_set_justify (GTK_LABEL (label4), GTK_JUSTIFY_CENTER);
|
|
||||||
|
|
||||||
GtkCombo_Eth = gtk_combo_new ();
|
|
||||||
g_object_set_data (G_OBJECT (GTK_COMBO (GtkCombo_Eth)->popwin),
|
|
||||||
"GladeParentKey", GtkCombo_Eth);
|
|
||||||
gtk_widget_set_name (GtkCombo_Eth, "GtkCombo_Eth");
|
|
||||||
gtk_widget_show (GtkCombo_Eth);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox1), GtkCombo_Eth, FALSE, FALSE, 0);
|
|
||||||
GtkCombo_Eth_items = g_list_append (GtkCombo_Eth_items, (gpointer) "");
|
|
||||||
gtk_combo_set_popdown_strings (GTK_COMBO (GtkCombo_Eth), GtkCombo_Eth_items);
|
|
||||||
g_list_free (GtkCombo_Eth_items);
|
|
||||||
|
|
||||||
combo_entry1 = GTK_COMBO (GtkCombo_Eth)->entry;
|
|
||||||
gtk_widget_set_name (combo_entry1, "combo_entry1");
|
|
||||||
gtk_widget_show (combo_entry1);
|
|
||||||
|
|
||||||
label1 = gtk_label_new (_("Ethernet"));
|
|
||||||
gtk_widget_set_name (label1, "label1");
|
|
||||||
gtk_widget_show (label1);
|
|
||||||
gtk_frame_set_label_widget (GTK_FRAME (frame2), label1);
|
|
||||||
|
|
||||||
frame3 = gtk_frame_new (NULL);
|
frame3 = gtk_frame_new (NULL);
|
||||||
gtk_widget_set_name (frame3, "frame3");
|
gtk_widget_set_name (frame3, "frame3");
|
||||||
gtk_widget_show (frame3);
|
gtk_widget_show (frame3);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox1), frame3, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox1), frame3, TRUE, TRUE, 0);
|
||||||
|
gtk_frame_set_shadow_type (GTK_FRAME (frame3), GTK_SHADOW_NONE);
|
||||||
|
|
||||||
hbox2 = gtk_hbox_new (TRUE, 5);
|
alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1);
|
||||||
gtk_widget_set_name (hbox2, "hbox2");
|
gtk_widget_set_name (alignment1, "alignment1");
|
||||||
gtk_widget_show (hbox2);
|
gtk_widget_show (alignment1);
|
||||||
gtk_container_add (GTK_CONTAINER (frame3), hbox2);
|
gtk_container_add (GTK_CONTAINER (frame3), alignment1);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (hbox2), 5);
|
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment1), 0, 0, 12, 0);
|
||||||
|
|
||||||
label5 = gtk_label_new (_("Device:"));
|
check_logging = gtk_check_button_new_with_mnemonic (_("Enable Logging"));
|
||||||
gtk_widget_set_name (label5, "label5");
|
gtk_widget_set_name (check_logging, "check_logging");
|
||||||
gtk_widget_show (label5);
|
gtk_widget_show (check_logging);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox2), label5, FALSE, FALSE, 0);
|
gtk_container_add (GTK_CONTAINER (alignment1), check_logging);
|
||||||
gtk_label_set_justify (GTK_LABEL (label5), GTK_JUSTIFY_CENTER);
|
|
||||||
|
|
||||||
GtkCombo_Hdd = gtk_combo_new ();
|
label15 = gtk_label_new (_("<b>Logging</b>"));
|
||||||
g_object_set_data (G_OBJECT (GTK_COMBO (GtkCombo_Hdd)->popwin),
|
|
||||||
"GladeParentKey", GtkCombo_Hdd);
|
|
||||||
gtk_widget_set_name (GtkCombo_Hdd, "GtkCombo_Hdd");
|
|
||||||
gtk_widget_show (GtkCombo_Hdd);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox2), GtkCombo_Hdd, FALSE, FALSE, 0);
|
|
||||||
GtkCombo_Hdd_items = g_list_append (GtkCombo_Hdd_items, (gpointer) "");
|
|
||||||
gtk_combo_set_popdown_strings (GTK_COMBO (GtkCombo_Hdd), GtkCombo_Hdd_items);
|
|
||||||
g_list_free (GtkCombo_Hdd_items);
|
|
||||||
|
|
||||||
entry1 = GTK_COMBO (GtkCombo_Hdd)->entry;
|
|
||||||
gtk_widget_set_name (entry1, "entry1");
|
|
||||||
gtk_widget_show (entry1);
|
|
||||||
|
|
||||||
label15 = gtk_label_new (_("Hdd"));
|
|
||||||
gtk_widget_set_name (label15, "label15");
|
gtk_widget_set_name (label15, "label15");
|
||||||
gtk_widget_show (label15);
|
gtk_widget_show (label15);
|
||||||
gtk_frame_set_label_widget (GTK_FRAME (frame3), label15);
|
gtk_frame_set_label_widget (GTK_FRAME (frame3), label15);
|
||||||
|
gtk_label_set_use_markup (GTK_LABEL (label15), TRUE);
|
||||||
|
|
||||||
hbuttonbox1 = gtk_hbutton_box_new ();
|
hbuttonbox1 = gtk_hbutton_box_new ();
|
||||||
gtk_widget_set_name (hbuttonbox1, "hbuttonbox1");
|
gtk_widget_set_name (hbuttonbox1, "hbuttonbox1");
|
||||||
|
@ -160,17 +101,9 @@ create_Config (void)
|
||||||
/* Store pointers to all widgets, for use by lookup_widget(). */
|
/* Store pointers to all widgets, for use by lookup_widget(). */
|
||||||
GLADE_HOOKUP_OBJECT_NO_REF (Config, Config, "Config");
|
GLADE_HOOKUP_OBJECT_NO_REF (Config, Config, "Config");
|
||||||
GLADE_HOOKUP_OBJECT (Config, vbox1, "vbox1");
|
GLADE_HOOKUP_OBJECT (Config, vbox1, "vbox1");
|
||||||
GLADE_HOOKUP_OBJECT (Config, frame2, "frame2");
|
|
||||||
GLADE_HOOKUP_OBJECT (Config, hbox1, "hbox1");
|
|
||||||
GLADE_HOOKUP_OBJECT (Config, label4, "label4");
|
|
||||||
GLADE_HOOKUP_OBJECT (Config, GtkCombo_Eth, "GtkCombo_Eth");
|
|
||||||
GLADE_HOOKUP_OBJECT (Config, combo_entry1, "combo_entry1");
|
|
||||||
GLADE_HOOKUP_OBJECT (Config, label1, "label1");
|
|
||||||
GLADE_HOOKUP_OBJECT (Config, frame3, "frame3");
|
GLADE_HOOKUP_OBJECT (Config, frame3, "frame3");
|
||||||
GLADE_HOOKUP_OBJECT (Config, hbox2, "hbox2");
|
GLADE_HOOKUP_OBJECT (Config, alignment1, "alignment1");
|
||||||
GLADE_HOOKUP_OBJECT (Config, label5, "label5");
|
GLADE_HOOKUP_OBJECT (Config, check_logging, "check_logging");
|
||||||
GLADE_HOOKUP_OBJECT (Config, GtkCombo_Hdd, "GtkCombo_Hdd");
|
|
||||||
GLADE_HOOKUP_OBJECT (Config, entry1, "entry1");
|
|
||||||
GLADE_HOOKUP_OBJECT (Config, label15, "label15");
|
GLADE_HOOKUP_OBJECT (Config, label15, "label15");
|
||||||
GLADE_HOOKUP_OBJECT (Config, hbuttonbox1, "hbuttonbox1");
|
GLADE_HOOKUP_OBJECT (Config, hbuttonbox1, "hbuttonbox1");
|
||||||
GLADE_HOOKUP_OBJECT (Config, button1, "button1");
|
GLADE_HOOKUP_OBJECT (Config, button1, "button1");
|
||||||
|
@ -192,7 +125,7 @@ create_About (void)
|
||||||
About = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
About = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
gtk_widget_set_name (About, "About");
|
gtk_widget_set_name (About, "About");
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (About), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (About), 5);
|
||||||
gtk_window_set_title (GTK_WINDOW (About), _("DEV9about"));
|
gtk_window_set_title (GTK_WINDOW (About), _("FWabout"));
|
||||||
|
|
||||||
vbox2 = gtk_vbox_new (FALSE, 5);
|
vbox2 = gtk_vbox_new (FALSE, 5);
|
||||||
gtk_widget_set_name (vbox2, "vbox2");
|
gtk_widget_set_name (vbox2, "vbox2");
|
||||||
|
@ -206,7 +139,7 @@ create_About (void)
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), label2, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox2), label2, FALSE, FALSE, 0);
|
||||||
gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_CENTER);
|
gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_CENTER);
|
||||||
|
|
||||||
label3 = gtk_label_new (_("Author: linuzappz <linuzappz@hotmail.com>"));
|
label3 = gtk_label_new (_("Original Author: linuzappz <linuzappz@hotmail.com>\nRevised by arcum42@gmail.com"));
|
||||||
gtk_widget_set_name (label3, "label3");
|
gtk_widget_set_name (label3, "label3");
|
||||||
gtk_widget_show (label3);
|
gtk_widget_show (label3);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), label3, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox2), label3, FALSE, FALSE, 0);
|
||||||
|
|
|
@ -22,13 +22,11 @@ libFWnull_LDFLAGS= @SHARED_LDFLAGS@
|
||||||
libFWnull_LDFLAGS+=-Wl,-soname,@libFWnull_SONAME@
|
libFWnull_LDFLAGS+=-Wl,-soname,@libFWnull_SONAME@
|
||||||
libFWnull_LDADD=$(libFWnull_a_OBJECTS)
|
libFWnull_LDADD=$(libFWnull_a_OBJECTS)
|
||||||
|
|
||||||
libFWnull_a_SOURCES = FW.cpp Linux/Config.cpp Linux/Linux.cpp \
|
libFWnull_a_SOURCES = FW.cpp FW.h Linux/Config.cpp Linux/Config.h
|
||||||
FW.h Linux/Config.h Linux/Linux.h
|
|
||||||
|
|
||||||
libFWnull_a_SOURCES += \
|
libFWnull_a_SOURCES += \
|
||||||
Linux/interface.h Linux/support.c \
|
Linux/interface.h Linux/support.c \
|
||||||
Linux/interface.c Linux/support.h \
|
Linux/interface.c Linux/support.h \
|
||||||
Linux/callbacks.h
|
Linux/callbacks.h
|
||||||
#Linux/callbacks.c
|
|
||||||
|
|
||||||
#SUBDIRS = Linux
|
#SUBDIRS = Linux
|
|
@ -16,12 +16,25 @@
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "Config.h"
|
||||||
#include "SPU2.h"
|
#include "SPU2.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#ifdef __cplusplus
|
||||||
#include <stdlib.h>
|
extern "C"
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
|
||||||
GtkWidget *MsgDlg;
|
#include "support.h"
|
||||||
|
#include "callbacks.h"
|
||||||
|
#include "interface.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
GtkWidget *MsgDlg, *About, *Conf;
|
||||||
|
|
||||||
void OnMsg_Ok()
|
void OnMsg_Ok()
|
||||||
{
|
{
|
||||||
|
@ -71,16 +84,81 @@ void SysMessage(char *fmt, ...)
|
||||||
gtk_main();
|
gtk_main();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OnAbout_Ok(GtkButton *button, gpointer user_data)
|
||||||
|
{
|
||||||
|
gtk_widget_destroy(About);
|
||||||
|
gtk_main_quit();
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnConf_Ok(GtkButton *button, gpointer user_data)
|
||||||
|
{
|
||||||
|
conf.Log = is_checked(Conf, "check_logging");
|
||||||
|
SaveConfig();
|
||||||
|
|
||||||
|
gtk_widget_destroy(Conf);
|
||||||
|
gtk_main_quit();
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnConf_Cancel(GtkButton *button, gpointer user_data)
|
||||||
|
{
|
||||||
|
gtk_widget_destroy(Conf);
|
||||||
|
gtk_main_quit();
|
||||||
|
}
|
||||||
|
|
||||||
EXPORT_C_(void) SPU2configure()
|
EXPORT_C_(void) SPU2configure()
|
||||||
{
|
{
|
||||||
SysMessage("Nothing to Configure");
|
//SysMessage("Nothing to Configure");
|
||||||
|
|
||||||
|
Conf = create_Config();
|
||||||
|
|
||||||
|
LoadConfig();
|
||||||
|
|
||||||
|
set_checked(Conf, "check_logging", conf.Log);
|
||||||
|
gtk_widget_show_all(Conf);
|
||||||
|
gtk_main();
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_C_(void) SPU2about()
|
EXPORT_C_(void) SPU2about()
|
||||||
{
|
{
|
||||||
SysMessage("%s %d.%d", libraryName, version, build);
|
//SysMessage("%s %d.%d", libraryName, version, build);
|
||||||
|
|
||||||
|
About = create_About();
|
||||||
|
gtk_widget_show_all(About);
|
||||||
|
gtk_main();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadConfig()
|
void LoadConfig()
|
||||||
{
|
{
|
||||||
|
FILE *f;
|
||||||
|
char cfg[255];
|
||||||
|
|
||||||
|
strcpy(cfg, s_strIniPath.c_str());
|
||||||
|
f = fopen(cfg, "r");
|
||||||
|
if (f == NULL)
|
||||||
|
{
|
||||||
|
printf("failed to open %s\n", s_strIniPath.c_str());
|
||||||
|
SaveConfig();//save and return
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
fscanf(f, "logging = %hhx\n", &conf.Log);
|
||||||
|
//fscanf(f, "options = %hhx\n", &confOptions);
|
||||||
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SaveConfig()
|
||||||
|
{
|
||||||
|
FILE *f;
|
||||||
|
char cfg[255];
|
||||||
|
|
||||||
|
strcpy(cfg, s_strIniPath.c_str());
|
||||||
|
f = fopen(cfg,"w");
|
||||||
|
if (f == NULL)
|
||||||
|
{
|
||||||
|
printf("failed to open %s\n", s_strIniPath.c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fprintf(f, "logging = %hhx\n", conf.Log);
|
||||||
|
//fprintf(f, "options = %hhx\n", confOptions);
|
||||||
|
fclose(f);
|
||||||
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
/* FWnull
|
/* SPU2null
|
||||||
* Copyright (C) 2004-2009 PCSX2 Team
|
* Copyright (C) 2002-2005 SPU2null Team
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -14,40 +14,17 @@
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <gtk/gtk.h>
|
||||||
#include <sys/stat.h>
|
#include <string>
|
||||||
#include <sys/ioctl.h>
|
using namespace std;
|
||||||
#include <pthread.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include "FW.h"
|
void SaveConf();
|
||||||
#include "Config.h"
|
void LoadConf();
|
||||||
|
extern string s_strIniPath;
|
||||||
void SysMessage(char *fmt, ...)
|
|
||||||
{
|
|
||||||
va_list list;
|
|
||||||
char msg[512];
|
|
||||||
char cmd[512];
|
|
||||||
|
|
||||||
va_start(list, fmt);
|
|
||||||
vsprintf(msg, fmt, list);
|
|
||||||
va_end(list);
|
|
||||||
|
|
||||||
cfgSysMessage(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
void FWconfigure()
|
|
||||||
{
|
|
||||||
CFGconfigure();
|
|
||||||
}
|
|
||||||
|
|
||||||
void FWabout()
|
|
||||||
{
|
|
||||||
CFGabout();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
#define is_checked(main_widget, widget_name) (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(main_widget, widget_name))))
|
||||||
|
#define set_checked(main_widget,widget_name, state) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(main_widget, widget_name)), state)
|
|
@ -0,0 +1,34 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
#include "callbacks.h"
|
||||||
|
#include "interface.h"
|
||||||
|
#include "support.h"
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
OnConf_Ok (GtkButton *button,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
OnConf_Cancel (GtkButton *button,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
OnAbout_Ok (GtkButton *button,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
OnConf_Ok (GtkButton *button,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
OnConf_Cancel (GtkButton *button,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
OnAbout_Ok (GtkButton *button,
|
||||||
|
gpointer user_data);
|
|
@ -0,0 +1,173 @@
|
||||||
|
/*
|
||||||
|
* DO NOT EDIT THIS FILE - it is generated by Glade.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <gdk/gdkkeysyms.h>
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
#include "callbacks.h"
|
||||||
|
#include "interface.h"
|
||||||
|
#include "support.h"
|
||||||
|
|
||||||
|
#define GLADE_HOOKUP_OBJECT(component,widget,name) \
|
||||||
|
g_object_set_data_full (G_OBJECT (component), name, \
|
||||||
|
gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
|
||||||
|
|
||||||
|
#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
|
||||||
|
g_object_set_data (G_OBJECT (component), name, widget)
|
||||||
|
|
||||||
|
GtkWidget*
|
||||||
|
create_Config (void)
|
||||||
|
{
|
||||||
|
GtkWidget *Config;
|
||||||
|
GtkWidget *vbox1;
|
||||||
|
GtkWidget *frame3;
|
||||||
|
GtkWidget *alignment1;
|
||||||
|
GtkWidget *check_logging;
|
||||||
|
GtkWidget *label15;
|
||||||
|
GtkWidget *hbuttonbox1;
|
||||||
|
GtkWidget *button1;
|
||||||
|
GtkWidget *button2;
|
||||||
|
|
||||||
|
Config = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
|
gtk_widget_set_name (Config, "Config");
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (Config), 5);
|
||||||
|
gtk_window_set_title (GTK_WINDOW (Config), _("SPU2config"));
|
||||||
|
|
||||||
|
vbox1 = gtk_vbox_new (FALSE, 5);
|
||||||
|
gtk_widget_set_name (vbox1, "vbox1");
|
||||||
|
gtk_widget_show (vbox1);
|
||||||
|
gtk_container_add (GTK_CONTAINER (Config), vbox1);
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (vbox1), 5);
|
||||||
|
|
||||||
|
frame3 = gtk_frame_new (NULL);
|
||||||
|
gtk_widget_set_name (frame3, "frame3");
|
||||||
|
gtk_widget_show (frame3);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox1), frame3, TRUE, TRUE, 0);
|
||||||
|
gtk_frame_set_shadow_type (GTK_FRAME (frame3), GTK_SHADOW_NONE);
|
||||||
|
|
||||||
|
alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1);
|
||||||
|
gtk_widget_set_name (alignment1, "alignment1");
|
||||||
|
gtk_widget_show (alignment1);
|
||||||
|
gtk_container_add (GTK_CONTAINER (frame3), alignment1);
|
||||||
|
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment1), 0, 0, 12, 0);
|
||||||
|
|
||||||
|
check_logging = gtk_check_button_new_with_mnemonic (_("Enable Logging"));
|
||||||
|
gtk_widget_set_name (check_logging, "check_logging");
|
||||||
|
gtk_widget_show (check_logging);
|
||||||
|
gtk_container_add (GTK_CONTAINER (alignment1), check_logging);
|
||||||
|
|
||||||
|
label15 = gtk_label_new (_("<b>Logging</b>"));
|
||||||
|
gtk_widget_set_name (label15, "label15");
|
||||||
|
gtk_widget_show (label15);
|
||||||
|
gtk_frame_set_label_widget (GTK_FRAME (frame3), label15);
|
||||||
|
gtk_label_set_use_markup (GTK_LABEL (label15), TRUE);
|
||||||
|
|
||||||
|
hbuttonbox1 = gtk_hbutton_box_new ();
|
||||||
|
gtk_widget_set_name (hbuttonbox1, "hbuttonbox1");
|
||||||
|
gtk_widget_show (hbuttonbox1);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, TRUE, TRUE, 0);
|
||||||
|
gtk_box_set_spacing (GTK_BOX (hbuttonbox1), 30);
|
||||||
|
|
||||||
|
button1 = gtk_button_new_with_mnemonic (_("Ok"));
|
||||||
|
gtk_widget_set_name (button1, "button1");
|
||||||
|
gtk_widget_show (button1);
|
||||||
|
gtk_container_add (GTK_CONTAINER (hbuttonbox1), button1);
|
||||||
|
GTK_WIDGET_SET_FLAGS (button1, GTK_CAN_DEFAULT);
|
||||||
|
|
||||||
|
button2 = gtk_button_new_with_mnemonic (_("Cancel"));
|
||||||
|
gtk_widget_set_name (button2, "button2");
|
||||||
|
gtk_widget_show (button2);
|
||||||
|
gtk_container_add (GTK_CONTAINER (hbuttonbox1), button2);
|
||||||
|
GTK_WIDGET_SET_FLAGS (button2, GTK_CAN_DEFAULT);
|
||||||
|
|
||||||
|
g_signal_connect ((gpointer) button1, "clicked",
|
||||||
|
G_CALLBACK (OnConf_Ok),
|
||||||
|
NULL);
|
||||||
|
g_signal_connect ((gpointer) button2, "clicked",
|
||||||
|
G_CALLBACK (OnConf_Cancel),
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
/* Store pointers to all widgets, for use by lookup_widget(). */
|
||||||
|
GLADE_HOOKUP_OBJECT_NO_REF (Config, Config, "Config");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, vbox1, "vbox1");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, frame3, "frame3");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, alignment1, "alignment1");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, check_logging, "check_logging");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, label15, "label15");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, hbuttonbox1, "hbuttonbox1");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, button1, "button1");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, button2, "button2");
|
||||||
|
|
||||||
|
return Config;
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkWidget*
|
||||||
|
create_About (void)
|
||||||
|
{
|
||||||
|
GtkWidget *About;
|
||||||
|
GtkWidget *vbox2;
|
||||||
|
GtkWidget *label2;
|
||||||
|
GtkWidget *label3;
|
||||||
|
GtkWidget *hbuttonbox2;
|
||||||
|
GtkWidget *button3;
|
||||||
|
|
||||||
|
About = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
|
gtk_widget_set_name (About, "About");
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (About), 5);
|
||||||
|
gtk_window_set_title (GTK_WINDOW (About), _("SPU2about"));
|
||||||
|
|
||||||
|
vbox2 = gtk_vbox_new (FALSE, 5);
|
||||||
|
gtk_widget_set_name (vbox2, "vbox2");
|
||||||
|
gtk_widget_show (vbox2);
|
||||||
|
gtk_container_add (GTK_CONTAINER (About), vbox2);
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 5);
|
||||||
|
|
||||||
|
label2 = gtk_label_new (_("SPU2 Null Driver"));
|
||||||
|
gtk_widget_set_name (label2, "label2");
|
||||||
|
gtk_widget_show (label2);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox2), label2, FALSE, FALSE, 0);
|
||||||
|
gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_CENTER);
|
||||||
|
|
||||||
|
label3 = gtk_label_new (_("Original Author: ? (zerofrog? linuz?)\nRevised by arcum42@gmail.com"));
|
||||||
|
gtk_widget_set_name (label3, "label3");
|
||||||
|
gtk_widget_show (label3);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox2), label3, FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
hbuttonbox2 = gtk_hbutton_box_new ();
|
||||||
|
gtk_widget_set_name (hbuttonbox2, "hbuttonbox2");
|
||||||
|
gtk_widget_show (hbuttonbox2);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox2), hbuttonbox2, TRUE, TRUE, 0);
|
||||||
|
gtk_box_set_spacing (GTK_BOX (hbuttonbox2), 30);
|
||||||
|
|
||||||
|
button3 = gtk_button_new_with_mnemonic (_("Ok"));
|
||||||
|
gtk_widget_set_name (button3, "button3");
|
||||||
|
gtk_widget_show (button3);
|
||||||
|
gtk_container_add (GTK_CONTAINER (hbuttonbox2), button3);
|
||||||
|
GTK_WIDGET_SET_FLAGS (button3, GTK_CAN_DEFAULT);
|
||||||
|
|
||||||
|
g_signal_connect ((gpointer) button3, "clicked",
|
||||||
|
G_CALLBACK (OnAbout_Ok),
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
/* Store pointers to all widgets, for use by lookup_widget(). */
|
||||||
|
GLADE_HOOKUP_OBJECT_NO_REF (About, About, "About");
|
||||||
|
GLADE_HOOKUP_OBJECT (About, vbox2, "vbox2");
|
||||||
|
GLADE_HOOKUP_OBJECT (About, label2, "label2");
|
||||||
|
GLADE_HOOKUP_OBJECT (About, label3, "label3");
|
||||||
|
GLADE_HOOKUP_OBJECT (About, hbuttonbox2, "hbuttonbox2");
|
||||||
|
GLADE_HOOKUP_OBJECT (About, button3, "button3");
|
||||||
|
|
||||||
|
return About;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
/*
|
||||||
|
* DO NOT EDIT THIS FILE - it is generated by Glade.
|
||||||
|
*/
|
||||||
|
|
||||||
|
GtkWidget* create_Config (void);
|
||||||
|
GtkWidget* create_About (void);
|
|
@ -0,0 +1,241 @@
|
||||||
|
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
|
||||||
|
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
|
||||||
|
|
||||||
|
<glade-interface>
|
||||||
|
|
||||||
|
<widget class="GtkWindow" id="Config">
|
||||||
|
<property name="border_width">5</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes">SPU2config</property>
|
||||||
|
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||||
|
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||||
|
<property name="modal">False</property>
|
||||||
|
<property name="resizable">True</property>
|
||||||
|
<property name="destroy_with_parent">False</property>
|
||||||
|
<property name="decorated">True</property>
|
||||||
|
<property name="skip_taskbar_hint">False</property>
|
||||||
|
<property name="skip_pager_hint">False</property>
|
||||||
|
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||||
|
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||||
|
<property name="focus_on_map">True</property>
|
||||||
|
<property name="urgency_hint">False</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkVBox" id="vbox1">
|
||||||
|
<property name="border_width">5</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkFrame" id="frame3">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label_xalign">0</property>
|
||||||
|
<property name="label_yalign">0.5</property>
|
||||||
|
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkAlignment" id="alignment1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xscale">1</property>
|
||||||
|
<property name="yscale">1</property>
|
||||||
|
<property name="top_padding">0</property>
|
||||||
|
<property name="bottom_padding">0</property>
|
||||||
|
<property name="left_padding">12</property>
|
||||||
|
<property name="right_padding">0</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkCheckButton" id="check_logging">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes">Enable Logging</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
<property name="focus_on_click">True</property>
|
||||||
|
<property name="active">False</property>
|
||||||
|
<property name="inconsistent">False</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label15">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes"><b>Logging</b></property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">True</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="type">label_item</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkHButtonBox" id="hbuttonbox1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
|
||||||
|
<property name="spacing">30</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkButton" id="button1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_default">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes">Ok</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
<property name="focus_on_click">True</property>
|
||||||
|
<signal name="clicked" handler="OnConf_Ok"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkButton" id="button2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_default">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes">Cancel</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
<property name="focus_on_click">True</property>
|
||||||
|
<signal name="clicked" handler="OnConf_Cancel"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget class="GtkWindow" id="About">
|
||||||
|
<property name="border_width">5</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes">SPU2about</property>
|
||||||
|
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||||
|
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||||
|
<property name="modal">False</property>
|
||||||
|
<property name="resizable">True</property>
|
||||||
|
<property name="destroy_with_parent">False</property>
|
||||||
|
<property name="decorated">True</property>
|
||||||
|
<property name="skip_taskbar_hint">False</property>
|
||||||
|
<property name="skip_pager_hint">False</property>
|
||||||
|
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||||
|
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||||
|
<property name="focus_on_map">True</property>
|
||||||
|
<property name="urgency_hint">False</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkVBox" id="vbox2">
|
||||||
|
<property name="border_width">5</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">SPU2 Null Driver</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label3">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Original Author: ? (zerofrog? linuz?)
|
||||||
|
Revised by arcum42@gmail.com</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkHButtonBox" id="hbuttonbox2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
|
||||||
|
<property name="spacing">30</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkButton" id="button3">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_default">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes">Ok</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
<property name="focus_on_click">True</property>
|
||||||
|
<signal name="clicked" handler="OnAbout_Ok"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
</glade-interface>
|
|
@ -0,0 +1,144 @@
|
||||||
|
/*
|
||||||
|
* DO NOT EDIT THIS FILE - it is generated by Glade.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
#include "support.h"
|
||||||
|
|
||||||
|
GtkWidget*
|
||||||
|
lookup_widget (GtkWidget *widget,
|
||||||
|
const gchar *widget_name)
|
||||||
|
{
|
||||||
|
GtkWidget *parent, *found_widget;
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
if (GTK_IS_MENU (widget))
|
||||||
|
parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
|
||||||
|
else
|
||||||
|
parent = widget->parent;
|
||||||
|
if (!parent)
|
||||||
|
parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey");
|
||||||
|
if (parent == NULL)
|
||||||
|
break;
|
||||||
|
widget = parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
|
||||||
|
widget_name);
|
||||||
|
if (!found_widget)
|
||||||
|
g_warning ("Widget not found: %s", widget_name);
|
||||||
|
return found_widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
static GList *pixmaps_directories = NULL;
|
||||||
|
|
||||||
|
/* Use this function to set the directory containing installed pixmaps. */
|
||||||
|
void
|
||||||
|
add_pixmap_directory (const gchar *directory)
|
||||||
|
{
|
||||||
|
pixmaps_directories = g_list_prepend (pixmaps_directories,
|
||||||
|
g_strdup (directory));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This is an internally used function to find pixmap files. */
|
||||||
|
static gchar*
|
||||||
|
find_pixmap_file (const gchar *filename)
|
||||||
|
{
|
||||||
|
GList *elem;
|
||||||
|
|
||||||
|
/* We step through each of the pixmaps directory to find it. */
|
||||||
|
elem = pixmaps_directories;
|
||||||
|
while (elem)
|
||||||
|
{
|
||||||
|
gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
|
||||||
|
G_DIR_SEPARATOR_S, filename);
|
||||||
|
if (g_file_test (pathname, G_FILE_TEST_EXISTS))
|
||||||
|
return pathname;
|
||||||
|
g_free (pathname);
|
||||||
|
elem = elem->next;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This is an internally used function to create pixmaps. */
|
||||||
|
GtkWidget*
|
||||||
|
create_pixmap (GtkWidget *widget,
|
||||||
|
const gchar *filename)
|
||||||
|
{
|
||||||
|
gchar *pathname = NULL;
|
||||||
|
GtkWidget *pixmap;
|
||||||
|
|
||||||
|
if (!filename || !filename[0])
|
||||||
|
return gtk_image_new ();
|
||||||
|
|
||||||
|
pathname = find_pixmap_file (filename);
|
||||||
|
|
||||||
|
if (!pathname)
|
||||||
|
{
|
||||||
|
g_warning (_("Couldn't find pixmap file: %s"), filename);
|
||||||
|
return gtk_image_new ();
|
||||||
|
}
|
||||||
|
|
||||||
|
pixmap = gtk_image_new_from_file (pathname);
|
||||||
|
g_free (pathname);
|
||||||
|
return pixmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This is an internally used function to create pixmaps. */
|
||||||
|
GdkPixbuf*
|
||||||
|
create_pixbuf (const gchar *filename)
|
||||||
|
{
|
||||||
|
gchar *pathname = NULL;
|
||||||
|
GdkPixbuf *pixbuf;
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
|
if (!filename || !filename[0])
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
pathname = find_pixmap_file (filename);
|
||||||
|
|
||||||
|
if (!pathname)
|
||||||
|
{
|
||||||
|
g_warning (_("Couldn't find pixmap file: %s"), filename);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
|
||||||
|
if (!pixbuf)
|
||||||
|
{
|
||||||
|
fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
|
||||||
|
pathname, error->message);
|
||||||
|
g_error_free (error);
|
||||||
|
}
|
||||||
|
g_free (pathname);
|
||||||
|
return pixbuf;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This is used to set ATK action descriptions. */
|
||||||
|
void
|
||||||
|
glade_set_atk_action_description (AtkAction *action,
|
||||||
|
const gchar *action_name,
|
||||||
|
const gchar *description)
|
||||||
|
{
|
||||||
|
gint n_actions, i;
|
||||||
|
|
||||||
|
n_actions = atk_action_get_n_actions (action);
|
||||||
|
for (i = 0; i < n_actions; i++)
|
||||||
|
{
|
||||||
|
if (!strcmp (atk_action_get_name (action, i), action_name))
|
||||||
|
atk_action_set_description (action, i, description);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
/*
|
||||||
|
* DO NOT EDIT THIS FILE - it is generated by Glade.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Standard gettext macros.
|
||||||
|
*/
|
||||||
|
#ifdef ENABLE_NLS
|
||||||
|
# include <libintl.h>
|
||||||
|
# undef _
|
||||||
|
# define _(String) dgettext (PACKAGE, String)
|
||||||
|
# define Q_(String) g_strip_context ((String), gettext (String))
|
||||||
|
# ifdef gettext_noop
|
||||||
|
# define N_(String) gettext_noop (String)
|
||||||
|
# else
|
||||||
|
# define N_(String) (String)
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define textdomain(String) (String)
|
||||||
|
# define gettext(String) (String)
|
||||||
|
# define dgettext(Domain,Message) (Message)
|
||||||
|
# define dcgettext(Domain,Message,Type) (Message)
|
||||||
|
# define bindtextdomain(Domain,Directory) (Domain)
|
||||||
|
# define _(String) (String)
|
||||||
|
# define Q_(String) g_strip_context ((String), (String))
|
||||||
|
# define N_(String) (String)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Public Functions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This function returns a widget in a component created by Glade.
|
||||||
|
* Call it with the toplevel widget in the component (i.e. a window/dialog),
|
||||||
|
* or alternatively any widget in the component, and the name of the widget
|
||||||
|
* you want returned.
|
||||||
|
*/
|
||||||
|
GtkWidget* lookup_widget (GtkWidget *widget,
|
||||||
|
const gchar *widget_name);
|
||||||
|
|
||||||
|
|
||||||
|
/* Use this function to set the directory containing installed pixmaps. */
|
||||||
|
void add_pixmap_directory (const gchar *directory);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Private Functions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* This is used to create the pixmaps used in the interface. */
|
||||||
|
GtkWidget* create_pixmap (GtkWidget *widget,
|
||||||
|
const gchar *filename);
|
||||||
|
|
||||||
|
/* This is used to create the pixbufs used in the interface. */
|
||||||
|
GdkPixbuf* create_pixbuf (const gchar *filename);
|
||||||
|
|
||||||
|
/* This is used to set ATK action descriptions. */
|
||||||
|
void glade_set_atk_action_description (AtkAction *action,
|
||||||
|
const gchar *action_name,
|
||||||
|
const gchar *description);
|
||||||
|
|
|
@ -22,6 +22,11 @@ libSPU2null_LDFLAGS= @SHARED_LDFLAGS@
|
||||||
libSPU2null_LDFLAGS+=-Wl,-soname,@libSPU2null_SONAME@
|
libSPU2null_LDFLAGS+=-Wl,-soname,@libSPU2null_SONAME@
|
||||||
libSPU2null_LDADD=$(libSPU2null_a_OBJECTS)
|
libSPU2null_LDADD=$(libSPU2null_a_OBJECTS)
|
||||||
|
|
||||||
libSPU2null_a_SOURCES = SPU2.cpp SPU2.h Linux/Config.cpp
|
libSPU2null_a_SOURCES = SPU2.cpp SPU2.h Linux/Config.cpp
|
||||||
|
|
||||||
|
libSPU2null_a_SOURCES += \
|
||||||
|
Linux/interface.h Linux/support.c \
|
||||||
|
Linux/interface.c Linux/support.h \
|
||||||
|
Linux/callbacks.h
|
||||||
|
|
||||||
#SUBDIRS = Linux
|
#SUBDIRS = Linux
|
|
@ -20,7 +20,9 @@
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
const unsigned char version = PS2E_SPU2_VERSION;
|
const unsigned char version = PS2E_SPU2_VERSION;
|
||||||
const unsigned char revision = 0;
|
const unsigned char revision = 0;
|
||||||
const unsigned char build = 7; // increase that with each version
|
const unsigned char build = 7; // increase that with each version
|
||||||
|
@ -38,6 +40,7 @@ char *libraryName = "SPU2null (Debug)";
|
||||||
#else
|
#else
|
||||||
char *libraryName = "SPU2null ";
|
char *libraryName = "SPU2null ";
|
||||||
#endif
|
#endif
|
||||||
|
string s_strIniPath="inis/SPU2null.ini";
|
||||||
|
|
||||||
FILE *spu2Log;
|
FILE *spu2Log;
|
||||||
Config conf;
|
Config conf;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __SPU2_H__
|
#ifndef __SPU2_H__
|
||||||
#define __SPU2_H__
|
#define __SPU2_H__
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,9 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
#include "USB.h"
|
||||||
|
#include "Config.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
|
@ -39,8 +42,6 @@ extern "C"
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "USB.h"
|
|
||||||
|
|
||||||
GtkWidget *MsgDlg, *About, *Conf;
|
GtkWidget *MsgDlg, *About, *Conf;
|
||||||
extern string s_strIniPath;
|
extern string s_strIniPath;
|
||||||
|
|
||||||
|
@ -50,7 +51,7 @@ void OnMsg_Ok()
|
||||||
gtk_main_quit();
|
gtk_main_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void cfgSysMessage(char *fmt, ...)
|
void SysMessage(char *fmt, ...)
|
||||||
{
|
{
|
||||||
GtkWidget *Ok, *Txt;
|
GtkWidget *Ok, *Txt;
|
||||||
GtkWidget *Box, *Box1;
|
GtkWidget *Box, *Box1;
|
||||||
|
@ -98,7 +99,7 @@ void OnAbout_Ok(GtkButton *button, gpointer user_data)
|
||||||
gtk_main_quit();
|
gtk_main_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFGabout()
|
EXPORT_C_(void) USBabout()
|
||||||
{
|
{
|
||||||
About = create_About();
|
About = create_About();
|
||||||
gtk_widget_show_all(About);
|
gtk_widget_show_all(About);
|
||||||
|
@ -107,6 +108,9 @@ void CFGabout()
|
||||||
|
|
||||||
void OnConf_Ok(GtkButton *button, gpointer user_data)
|
void OnConf_Ok(GtkButton *button, gpointer user_data)
|
||||||
{
|
{
|
||||||
|
conf.Log = is_checked(Conf, "check_logging");
|
||||||
|
SaveConfig();
|
||||||
|
|
||||||
gtk_widget_destroy(Conf);
|
gtk_widget_destroy(Conf);
|
||||||
gtk_main_quit();
|
gtk_main_quit();
|
||||||
}
|
}
|
||||||
|
@ -117,21 +121,16 @@ void OnConf_Cancel(GtkButton *button, gpointer user_data)
|
||||||
gtk_main_quit();
|
gtk_main_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFGconfigure()
|
EXPORT_C_(void) USBconfigure()
|
||||||
{
|
{
|
||||||
|
LoadConfig();
|
||||||
Conf = create_Config();
|
Conf = create_Config();
|
||||||
|
|
||||||
|
set_checked(Conf, "check_logging", conf.Log);
|
||||||
gtk_widget_show_all(Conf);
|
gtk_widget_show_all(Conf);
|
||||||
gtk_main();
|
gtk_main();
|
||||||
}
|
}
|
||||||
|
|
||||||
long CFGmessage(char *msg)
|
|
||||||
{
|
|
||||||
cfgSysMessage(msg);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void LoadConfig()
|
void LoadConfig()
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
@ -141,10 +140,11 @@ void LoadConfig()
|
||||||
f = fopen(cfg, "r");
|
f = fopen(cfg, "r");
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
{
|
{
|
||||||
printf("failed to open %s\n", s_strIniPath.c_str());
|
printf("failed to open '%s'\n", s_strIniPath.c_str());
|
||||||
SaveConfig();//save and return
|
SaveConfig();//save and return
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
fscanf(f, "logging = %hhx\n", &conf.Log);
|
||||||
//fscanf(f, "options = %hhx\n", &confOptions);
|
//fscanf(f, "options = %hhx\n", &confOptions);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
@ -158,10 +158,11 @@ void SaveConfig()
|
||||||
f = fopen(cfg,"w");
|
f = fopen(cfg,"w");
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
{
|
{
|
||||||
printf("failed to open %s\n", s_strIniPath.c_str());
|
printf("failed to open '%s'\n", s_strIniPath.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fprintf(f, "logging = %hhx\n", conf.Log);
|
||||||
//fprintf(f, "options = %hhx\n", confOptions);
|
//fprintf(f, "options = %hhx\n", confOptions);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
void SaveConfig();
|
void SaveConfig();
|
||||||
void LoadConfig();
|
void LoadConfig();
|
||||||
void cfgSysMessage(char *fmt, ...);
|
void SysMessage(char *fmt, ...);
|
||||||
void CFGabout();
|
|
||||||
void CFGconfigure();
|
#define is_checked(main_widget, widget_name) (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(lookup_widget(main_widget, widget_name))))
|
||||||
long CFGmessage(char *msg);
|
#define set_checked(main_widget,widget_name, state) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(lookup_widget(main_widget, widget_name)), state)
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include "USB.h"
|
#include "USB.h"
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
|
|
||||||
void SysMessage(char *fmt, ...)
|
/*void SysMessage(char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list list;
|
va_list list;
|
||||||
char msg[512];
|
char msg[512];
|
||||||
|
@ -39,9 +39,9 @@ void SysMessage(char *fmt, ...)
|
||||||
va_end(list);
|
va_end(list);
|
||||||
|
|
||||||
cfgSysMessage(msg);
|
cfgSysMessage(msg);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
void USBconfigure()
|
/*void USBconfigure()
|
||||||
{
|
{
|
||||||
CFGconfigure();
|
CFGconfigure();
|
||||||
}
|
}
|
||||||
|
@ -49,5 +49,5 @@ void USBconfigure()
|
||||||
void USBabout()
|
void USBabout()
|
||||||
{
|
{
|
||||||
CFGabout();
|
CFGabout();
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
|
@ -31,28 +31,18 @@ create_Config (void)
|
||||||
{
|
{
|
||||||
GtkWidget *Config;
|
GtkWidget *Config;
|
||||||
GtkWidget *vbox1;
|
GtkWidget *vbox1;
|
||||||
GtkWidget *frame2;
|
|
||||||
GtkWidget *hbox1;
|
|
||||||
GtkWidget *label4;
|
|
||||||
GtkWidget *GtkCombo_Eth;
|
|
||||||
GList *GtkCombo_Eth_items = NULL;
|
|
||||||
GtkWidget *combo_entry1;
|
|
||||||
GtkWidget *label1;
|
|
||||||
GtkWidget *frame3;
|
GtkWidget *frame3;
|
||||||
GtkWidget *hbox2;
|
GtkWidget *alignment1;
|
||||||
GtkWidget *label5;
|
GtkWidget *check_logging;
|
||||||
GtkWidget *GtkCombo_Hdd;
|
|
||||||
GList *GtkCombo_Hdd_items = NULL;
|
|
||||||
GtkWidget *entry1;
|
|
||||||
GtkWidget *label15;
|
GtkWidget *label15;
|
||||||
GtkWidget *hbuttonbox1;
|
GtkWidget *hbuttonbox3;
|
||||||
GtkWidget *button1;
|
GtkWidget *button4;
|
||||||
GtkWidget *button2;
|
GtkWidget *button5;
|
||||||
|
|
||||||
Config = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
Config = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
gtk_widget_set_name (Config, "Config");
|
gtk_widget_set_name (Config, "Config");
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (Config), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (Config), 5);
|
||||||
gtk_window_set_title (GTK_WINDOW (Config), _("DEV9config"));
|
gtk_window_set_title (GTK_WINDOW (Config), _("USBconfig"));
|
||||||
|
|
||||||
vbox1 = gtk_vbox_new (FALSE, 5);
|
vbox1 = gtk_vbox_new (FALSE, 5);
|
||||||
gtk_widget_set_name (vbox1, "vbox1");
|
gtk_widget_set_name (vbox1, "vbox1");
|
||||||
|
@ -60,121 +50,63 @@ create_Config (void)
|
||||||
gtk_container_add (GTK_CONTAINER (Config), vbox1);
|
gtk_container_add (GTK_CONTAINER (Config), vbox1);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vbox1), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (vbox1), 5);
|
||||||
|
|
||||||
frame2 = gtk_frame_new (NULL);
|
|
||||||
gtk_widget_set_name (frame2, "frame2");
|
|
||||||
gtk_widget_show (frame2);
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox1), frame2, TRUE, TRUE, 0);
|
|
||||||
|
|
||||||
hbox1 = gtk_hbox_new (TRUE, 5);
|
|
||||||
gtk_widget_set_name (hbox1, "hbox1");
|
|
||||||
gtk_widget_show (hbox1);
|
|
||||||
gtk_container_add (GTK_CONTAINER (frame2), hbox1);
|
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (hbox1), 5);
|
|
||||||
|
|
||||||
label4 = gtk_label_new (_("Device:"));
|
|
||||||
gtk_widget_set_name (label4, "label4");
|
|
||||||
gtk_widget_show (label4);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox1), label4, FALSE, FALSE, 0);
|
|
||||||
gtk_label_set_justify (GTK_LABEL (label4), GTK_JUSTIFY_CENTER);
|
|
||||||
|
|
||||||
GtkCombo_Eth = gtk_combo_new ();
|
|
||||||
g_object_set_data (G_OBJECT (GTK_COMBO (GtkCombo_Eth)->popwin),
|
|
||||||
"GladeParentKey", GtkCombo_Eth);
|
|
||||||
gtk_widget_set_name (GtkCombo_Eth, "GtkCombo_Eth");
|
|
||||||
gtk_widget_show (GtkCombo_Eth);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox1), GtkCombo_Eth, FALSE, FALSE, 0);
|
|
||||||
GtkCombo_Eth_items = g_list_append (GtkCombo_Eth_items, (gpointer) "");
|
|
||||||
gtk_combo_set_popdown_strings (GTK_COMBO (GtkCombo_Eth), GtkCombo_Eth_items);
|
|
||||||
g_list_free (GtkCombo_Eth_items);
|
|
||||||
|
|
||||||
combo_entry1 = GTK_COMBO (GtkCombo_Eth)->entry;
|
|
||||||
gtk_widget_set_name (combo_entry1, "combo_entry1");
|
|
||||||
gtk_widget_show (combo_entry1);
|
|
||||||
|
|
||||||
label1 = gtk_label_new (_("Ethernet"));
|
|
||||||
gtk_widget_set_name (label1, "label1");
|
|
||||||
gtk_widget_show (label1);
|
|
||||||
gtk_frame_set_label_widget (GTK_FRAME (frame2), label1);
|
|
||||||
|
|
||||||
frame3 = gtk_frame_new (NULL);
|
frame3 = gtk_frame_new (NULL);
|
||||||
gtk_widget_set_name (frame3, "frame3");
|
gtk_widget_set_name (frame3, "frame3");
|
||||||
gtk_widget_show (frame3);
|
gtk_widget_show (frame3);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox1), frame3, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox1), frame3, TRUE, TRUE, 0);
|
||||||
|
|
||||||
hbox2 = gtk_hbox_new (TRUE, 5);
|
alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1);
|
||||||
gtk_widget_set_name (hbox2, "hbox2");
|
gtk_widget_set_name (alignment1, "alignment1");
|
||||||
gtk_widget_show (hbox2);
|
gtk_widget_show (alignment1);
|
||||||
gtk_container_add (GTK_CONTAINER (frame3), hbox2);
|
gtk_container_add (GTK_CONTAINER (frame3), alignment1);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (hbox2), 5);
|
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment1), 0, 0, 12, 0);
|
||||||
|
|
||||||
label5 = gtk_label_new (_("Device:"));
|
check_logging = gtk_check_button_new_with_mnemonic (_("Enable Logging"));
|
||||||
gtk_widget_set_name (label5, "label5");
|
gtk_widget_set_name (check_logging, "check_logging");
|
||||||
gtk_widget_show (label5);
|
gtk_widget_show (check_logging);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox2), label5, FALSE, FALSE, 0);
|
gtk_container_add (GTK_CONTAINER (alignment1), check_logging);
|
||||||
gtk_label_set_justify (GTK_LABEL (label5), GTK_JUSTIFY_CENTER);
|
|
||||||
|
|
||||||
GtkCombo_Hdd = gtk_combo_new ();
|
label15 = gtk_label_new (_("<b>Logging</b>"));
|
||||||
g_object_set_data (G_OBJECT (GTK_COMBO (GtkCombo_Hdd)->popwin),
|
|
||||||
"GladeParentKey", GtkCombo_Hdd);
|
|
||||||
gtk_widget_set_name (GtkCombo_Hdd, "GtkCombo_Hdd");
|
|
||||||
gtk_widget_show (GtkCombo_Hdd);
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox2), GtkCombo_Hdd, FALSE, FALSE, 0);
|
|
||||||
GtkCombo_Hdd_items = g_list_append (GtkCombo_Hdd_items, (gpointer) "");
|
|
||||||
gtk_combo_set_popdown_strings (GTK_COMBO (GtkCombo_Hdd), GtkCombo_Hdd_items);
|
|
||||||
g_list_free (GtkCombo_Hdd_items);
|
|
||||||
|
|
||||||
entry1 = GTK_COMBO (GtkCombo_Hdd)->entry;
|
|
||||||
gtk_widget_set_name (entry1, "entry1");
|
|
||||||
gtk_widget_show (entry1);
|
|
||||||
|
|
||||||
label15 = gtk_label_new (_("Hdd"));
|
|
||||||
gtk_widget_set_name (label15, "label15");
|
gtk_widget_set_name (label15, "label15");
|
||||||
gtk_widget_show (label15);
|
gtk_widget_show (label15);
|
||||||
gtk_frame_set_label_widget (GTK_FRAME (frame3), label15);
|
gtk_frame_set_label_widget (GTK_FRAME (frame3), label15);
|
||||||
|
gtk_label_set_use_markup (GTK_LABEL (label15), TRUE);
|
||||||
|
|
||||||
hbuttonbox1 = gtk_hbutton_box_new ();
|
hbuttonbox3 = gtk_hbutton_box_new ();
|
||||||
gtk_widget_set_name (hbuttonbox1, "hbuttonbox1");
|
gtk_widget_set_name (hbuttonbox3, "hbuttonbox3");
|
||||||
gtk_widget_show (hbuttonbox1);
|
gtk_widget_show (hbuttonbox3);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, TRUE, TRUE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox3, TRUE, TRUE, 0);
|
||||||
gtk_box_set_spacing (GTK_BOX (hbuttonbox1), 30);
|
gtk_box_set_spacing (GTK_BOX (hbuttonbox3), 30);
|
||||||
|
|
||||||
button1 = gtk_button_new_with_mnemonic (_("Ok"));
|
button4 = gtk_button_new_with_mnemonic (_("Ok"));
|
||||||
gtk_widget_set_name (button1, "button1");
|
gtk_widget_set_name (button4, "button4");
|
||||||
gtk_widget_show (button1);
|
gtk_widget_show (button4);
|
||||||
gtk_container_add (GTK_CONTAINER (hbuttonbox1), button1);
|
gtk_container_add (GTK_CONTAINER (hbuttonbox3), button4);
|
||||||
GTK_WIDGET_SET_FLAGS (button1, GTK_CAN_DEFAULT);
|
GTK_WIDGET_SET_FLAGS (button4, GTK_CAN_DEFAULT);
|
||||||
|
|
||||||
button2 = gtk_button_new_with_mnemonic (_("Cancel"));
|
button5 = gtk_button_new_with_mnemonic (_("Cancel"));
|
||||||
gtk_widget_set_name (button2, "button2");
|
gtk_widget_set_name (button5, "button5");
|
||||||
gtk_widget_show (button2);
|
gtk_widget_show (button5);
|
||||||
gtk_container_add (GTK_CONTAINER (hbuttonbox1), button2);
|
gtk_container_add (GTK_CONTAINER (hbuttonbox3), button5);
|
||||||
GTK_WIDGET_SET_FLAGS (button2, GTK_CAN_DEFAULT);
|
GTK_WIDGET_SET_FLAGS (button5, GTK_CAN_DEFAULT);
|
||||||
|
|
||||||
g_signal_connect ((gpointer) button1, "clicked",
|
g_signal_connect ((gpointer) button4, "clicked",
|
||||||
G_CALLBACK (OnConf_Ok),
|
G_CALLBACK (OnConf_Ok),
|
||||||
NULL);
|
NULL);
|
||||||
g_signal_connect ((gpointer) button2, "clicked",
|
g_signal_connect ((gpointer) button5, "clicked",
|
||||||
G_CALLBACK (OnConf_Cancel),
|
G_CALLBACK (OnConf_Cancel),
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
/* Store pointers to all widgets, for use by lookup_widget(). */
|
/* Store pointers to all widgets, for use by lookup_widget(). */
|
||||||
GLADE_HOOKUP_OBJECT_NO_REF (Config, Config, "Config");
|
GLADE_HOOKUP_OBJECT_NO_REF (Config, Config, "Config");
|
||||||
GLADE_HOOKUP_OBJECT (Config, vbox1, "vbox1");
|
GLADE_HOOKUP_OBJECT (Config, vbox1, "vbox1");
|
||||||
GLADE_HOOKUP_OBJECT (Config, frame2, "frame2");
|
|
||||||
GLADE_HOOKUP_OBJECT (Config, hbox1, "hbox1");
|
|
||||||
GLADE_HOOKUP_OBJECT (Config, label4, "label4");
|
|
||||||
GLADE_HOOKUP_OBJECT (Config, GtkCombo_Eth, "GtkCombo_Eth");
|
|
||||||
GLADE_HOOKUP_OBJECT (Config, combo_entry1, "combo_entry1");
|
|
||||||
GLADE_HOOKUP_OBJECT (Config, label1, "label1");
|
|
||||||
GLADE_HOOKUP_OBJECT (Config, frame3, "frame3");
|
GLADE_HOOKUP_OBJECT (Config, frame3, "frame3");
|
||||||
GLADE_HOOKUP_OBJECT (Config, hbox2, "hbox2");
|
GLADE_HOOKUP_OBJECT (Config, alignment1, "alignment1");
|
||||||
GLADE_HOOKUP_OBJECT (Config, label5, "label5");
|
GLADE_HOOKUP_OBJECT (Config, check_logging, "check_logging");
|
||||||
GLADE_HOOKUP_OBJECT (Config, GtkCombo_Hdd, "GtkCombo_Hdd");
|
|
||||||
GLADE_HOOKUP_OBJECT (Config, entry1, "entry1");
|
|
||||||
GLADE_HOOKUP_OBJECT (Config, label15, "label15");
|
GLADE_HOOKUP_OBJECT (Config, label15, "label15");
|
||||||
GLADE_HOOKUP_OBJECT (Config, hbuttonbox1, "hbuttonbox1");
|
GLADE_HOOKUP_OBJECT (Config, hbuttonbox3, "hbuttonbox3");
|
||||||
GLADE_HOOKUP_OBJECT (Config, button1, "button1");
|
GLADE_HOOKUP_OBJECT (Config, button4, "button4");
|
||||||
GLADE_HOOKUP_OBJECT (Config, button2, "button2");
|
GLADE_HOOKUP_OBJECT (Config, button5, "button5");
|
||||||
|
|
||||||
return Config;
|
return Config;
|
||||||
}
|
}
|
||||||
|
@ -200,13 +132,13 @@ create_About (void)
|
||||||
gtk_container_add (GTK_CONTAINER (About), vbox2);
|
gtk_container_add (GTK_CONTAINER (About), vbox2);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 5);
|
||||||
|
|
||||||
label2 = gtk_label_new (_("FireWire Driver"));
|
label2 = gtk_label_new (_("USB Null Driver"));
|
||||||
gtk_widget_set_name (label2, "label2");
|
gtk_widget_set_name (label2, "label2");
|
||||||
gtk_widget_show (label2);
|
gtk_widget_show (label2);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), label2, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox2), label2, FALSE, FALSE, 0);
|
||||||
gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_CENTER);
|
gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_CENTER);
|
||||||
|
|
||||||
label3 = gtk_label_new (_("Author: linuzappz <linuzappz@hotmail.com>"));
|
label3 = gtk_label_new (_("Original Author: linuzappz <linuzappz@hotmail.com>\nRevised by arcum42@gmail.com."));
|
||||||
gtk_widget_set_name (label3, "label3");
|
gtk_widget_set_name (label3, "label3");
|
||||||
gtk_widget_show (label3);
|
gtk_widget_show (label3);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), label3, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox2), label3, FALSE, FALSE, 0);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<widget class="GtkWindow" id="Config">
|
<widget class="GtkWindow" id="Config">
|
||||||
<property name="border_width">5</property>
|
<property name="border_width">5</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="title" translatable="yes">DEV9config</property>
|
<property name="title" translatable="yes">USBconfig</property>
|
||||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||||
<property name="modal">False</property>
|
<property name="modal">False</property>
|
||||||
|
@ -27,140 +27,6 @@
|
||||||
<property name="homogeneous">False</property>
|
<property name="homogeneous">False</property>
|
||||||
<property name="spacing">5</property>
|
<property name="spacing">5</property>
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkFrame" id="frame2">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label_xalign">0</property>
|
|
||||||
<property name="label_yalign">0.5</property>
|
|
||||||
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkHBox" id="hbox1">
|
|
||||||
<property name="border_width">5</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="homogeneous">True</property>
|
|
||||||
<property name="spacing">5</property>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="label4">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">Device:</property>
|
|
||||||
<property name="use_underline">False</property>
|
|
||||||
<property name="use_markup">False</property>
|
|
||||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
|
||||||
<property name="wrap">False</property>
|
|
||||||
<property name="selectable">False</property>
|
|
||||||
<property name="xalign">0.5</property>
|
|
||||||
<property name="yalign">0.5</property>
|
|
||||||
<property name="xpad">0</property>
|
|
||||||
<property name="ypad">0</property>
|
|
||||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
|
||||||
<property name="width_chars">-1</property>
|
|
||||||
<property name="single_line_mode">False</property>
|
|
||||||
<property name="angle">0</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkCombo" id="GtkCombo_Eth">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="value_in_list">False</property>
|
|
||||||
<property name="allow_empty">True</property>
|
|
||||||
<property name="case_sensitive">False</property>
|
|
||||||
<property name="enable_arrow_keys">True</property>
|
|
||||||
<property name="enable_arrows_always">False</property>
|
|
||||||
|
|
||||||
<child internal-child="entry">
|
|
||||||
<widget class="GtkEntry" id="combo-entry1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="editable">True</property>
|
|
||||||
<property name="visibility">True</property>
|
|
||||||
<property name="max_length">0</property>
|
|
||||||
<property name="text" translatable="yes"></property>
|
|
||||||
<property name="has_frame">True</property>
|
|
||||||
<property name="invisible_char">*</property>
|
|
||||||
<property name="activates_default">False</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child internal-child="list">
|
|
||||||
<widget class="GtkList" id="convertwidget1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkListItem" id="convertwidget2">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="convertwidget3">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes"></property>
|
|
||||||
<property name="use_underline">False</property>
|
|
||||||
<property name="use_markup">False</property>
|
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
|
||||||
<property name="wrap">False</property>
|
|
||||||
<property name="selectable">False</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="yalign">0.5</property>
|
|
||||||
<property name="xpad">0</property>
|
|
||||||
<property name="ypad">0</property>
|
|
||||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
|
||||||
<property name="width_chars">-1</property>
|
|
||||||
<property name="single_line_mode">False</property>
|
|
||||||
<property name="angle">0</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="label1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">Ethernet</property>
|
|
||||||
<property name="use_underline">False</property>
|
|
||||||
<property name="use_markup">False</property>
|
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
|
||||||
<property name="wrap">False</property>
|
|
||||||
<property name="selectable">False</property>
|
|
||||||
<property name="xalign">0.5</property>
|
|
||||||
<property name="yalign">0.5</property>
|
|
||||||
<property name="xpad">0</property>
|
|
||||||
<property name="ypad">0</property>
|
|
||||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
|
||||||
<property name="width_chars">-1</property>
|
|
||||||
<property name="single_line_mode">False</property>
|
|
||||||
<property name="angle">0</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="type">label_item</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">True</property>
|
|
||||||
<property name="fill">True</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkFrame" id="frame3">
|
<widget class="GtkFrame" id="frame3">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -169,98 +35,29 @@
|
||||||
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkHBox" id="hbox2">
|
<widget class="GtkAlignment" id="alignment1">
|
||||||
<property name="border_width">5</property>
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="homogeneous">True</property>
|
<property name="xalign">0.5</property>
|
||||||
<property name="spacing">5</property>
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xscale">1</property>
|
||||||
|
<property name="yscale">1</property>
|
||||||
|
<property name="top_padding">0</property>
|
||||||
|
<property name="bottom_padding">0</property>
|
||||||
|
<property name="left_padding">12</property>
|
||||||
|
<property name="right_padding">0</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="label5">
|
<widget class="GtkCheckButton" id="check_logging">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Device:</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="use_underline">False</property>
|
<property name="label" translatable="yes">Enable Logging</property>
|
||||||
<property name="use_markup">False</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
<property name="wrap">False</property>
|
<property name="focus_on_click">True</property>
|
||||||
<property name="selectable">False</property>
|
<property name="active">False</property>
|
||||||
<property name="xalign">0.5</property>
|
<property name="inconsistent">False</property>
|
||||||
<property name="yalign">0.5</property>
|
<property name="draw_indicator">True</property>
|
||||||
<property name="xpad">0</property>
|
|
||||||
<property name="ypad">0</property>
|
|
||||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
|
||||||
<property name="width_chars">-1</property>
|
|
||||||
<property name="single_line_mode">False</property>
|
|
||||||
<property name="angle">0</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkCombo" id="GtkCombo_Hdd">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="value_in_list">False</property>
|
|
||||||
<property name="allow_empty">True</property>
|
|
||||||
<property name="case_sensitive">False</property>
|
|
||||||
<property name="enable_arrow_keys">True</property>
|
|
||||||
<property name="enable_arrows_always">False</property>
|
|
||||||
|
|
||||||
<child internal-child="entry">
|
|
||||||
<widget class="GtkEntry" id="entry1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="editable">True</property>
|
|
||||||
<property name="visibility">True</property>
|
|
||||||
<property name="max_length">0</property>
|
|
||||||
<property name="text" translatable="yes"></property>
|
|
||||||
<property name="has_frame">True</property>
|
|
||||||
<property name="invisible_char">*</property>
|
|
||||||
<property name="activates_default">False</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
|
|
||||||
<child internal-child="list">
|
|
||||||
<widget class="GtkList" id="convertwidget4">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkListItem" id="convertwidget5">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="convertwidget6">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes"></property>
|
|
||||||
<property name="use_underline">False</property>
|
|
||||||
<property name="use_markup">False</property>
|
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
|
||||||
<property name="wrap">False</property>
|
|
||||||
<property name="selectable">False</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="yalign">0.5</property>
|
|
||||||
<property name="xpad">0</property>
|
|
||||||
<property name="ypad">0</property>
|
|
||||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
|
||||||
<property name="width_chars">-1</property>
|
|
||||||
<property name="single_line_mode">False</property>
|
|
||||||
<property name="angle">0</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="padding">0</property>
|
|
||||||
<property name="expand">False</property>
|
|
||||||
<property name="fill">False</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
|
@ -268,9 +65,9 @@
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="label15">
|
<widget class="GtkLabel" id="label15">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Hdd</property>
|
<property name="label" translatable="yes"><b>Logging</b></property>
|
||||||
<property name="use_underline">False</property>
|
<property name="use_underline">False</property>
|
||||||
<property name="use_markup">False</property>
|
<property name="use_markup">True</property>
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
<property name="wrap">False</property>
|
<property name="wrap">False</property>
|
||||||
<property name="selectable">False</property>
|
<property name="selectable">False</property>
|
||||||
|
@ -296,13 +93,13 @@
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkHButtonBox" id="hbuttonbox1">
|
<widget class="GtkHButtonBox" id="hbuttonbox3">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
|
<property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
|
||||||
<property name="spacing">30</property>
|
<property name="spacing">30</property>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkButton" id="button1">
|
<widget class="GtkButton" id="button4">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_default">True</property>
|
<property name="can_default">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
|
@ -315,7 +112,7 @@
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkButton" id="button2">
|
<widget class="GtkButton" id="button5">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_default">True</property>
|
<property name="can_default">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
|
@ -364,7 +161,7 @@
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="label2">
|
<widget class="GtkLabel" id="label2">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">FireWire Driver</property>
|
<property name="label" translatable="yes">USB Null Driver</property>
|
||||||
<property name="use_underline">False</property>
|
<property name="use_underline">False</property>
|
||||||
<property name="use_markup">False</property>
|
<property name="use_markup">False</property>
|
||||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||||
|
@ -389,7 +186,8 @@
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="label3">
|
<widget class="GtkLabel" id="label3">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Author: linuzappz <linuzappz@hotmail.com></property>
|
<property name="label" translatable="yes">Original Author: linuzappz <linuzappz@hotmail.com>
|
||||||
|
Revised by arcum42@gmail.com.</property>
|
||||||
<property name="use_underline">False</property>
|
<property name="use_underline">False</property>
|
||||||
<property name="use_markup">False</property>
|
<property name="use_markup">False</property>
|
||||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
|
|
@ -23,13 +23,13 @@
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#include "USB.h"
|
#include "USB.h"
|
||||||
string s_strIniPath;
|
|
||||||
|
|
||||||
const unsigned char version = PS2E_USB_VERSION;
|
const unsigned char version = PS2E_USB_VERSION;
|
||||||
const unsigned char revision = 0;
|
const unsigned char revision = 0;
|
||||||
const unsigned char build = 6; // increase that with each version
|
const unsigned char build = 6; // increase that with each version
|
||||||
|
|
||||||
static char *libraryName = "USBnull Driver";
|
static char *libraryName = "USBnull Driver";
|
||||||
|
string s_strIniPath="inis/USBnull.ini";
|
||||||
//void (*USBirq)();
|
//void (*USBirq)();
|
||||||
USBcallback USBirq;
|
USBcallback USBirq;
|
||||||
Config conf;
|
Config conf;
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
#include "callbacks.h"
|
||||||
|
#include "interface.h"
|
||||||
|
#include "support.h"
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
OnConf_Ok (GtkButton *button,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
OnConf_Cancel (GtkButton *button,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
OnAbout_Ok (GtkButton *button,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
OnConf_Ok (GtkButton *button,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
OnConf_Cancel (GtkButton *button,
|
||||||
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
OnAbout_Ok (GtkButton *button,
|
||||||
|
gpointer user_data);
|
|
@ -0,0 +1,444 @@
|
||||||
|
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
|
||||||
|
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
|
||||||
|
|
||||||
|
<glade-interface>
|
||||||
|
|
||||||
|
<widget class="GtkWindow" id="Config">
|
||||||
|
<property name="border_width">5</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes">DEV9config</property>
|
||||||
|
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||||
|
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||||
|
<property name="modal">False</property>
|
||||||
|
<property name="resizable">True</property>
|
||||||
|
<property name="destroy_with_parent">False</property>
|
||||||
|
<property name="decorated">True</property>
|
||||||
|
<property name="skip_taskbar_hint">False</property>
|
||||||
|
<property name="skip_pager_hint">False</property>
|
||||||
|
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||||
|
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||||
|
<property name="focus_on_map">True</property>
|
||||||
|
<property name="urgency_hint">False</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkVBox" id="vbox1">
|
||||||
|
<property name="border_width">5</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkFrame" id="frame2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label_xalign">0</property>
|
||||||
|
<property name="label_yalign">0.5</property>
|
||||||
|
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkHBox" id="hbox1">
|
||||||
|
<property name="border_width">5</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label4">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Device:</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkCombo" id="GtkCombo_Eth">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="value_in_list">False</property>
|
||||||
|
<property name="allow_empty">True</property>
|
||||||
|
<property name="case_sensitive">False</property>
|
||||||
|
<property name="enable_arrow_keys">True</property>
|
||||||
|
<property name="enable_arrows_always">False</property>
|
||||||
|
|
||||||
|
<child internal-child="entry">
|
||||||
|
<widget class="GtkEntry" id="combo-entry1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="editable">True</property>
|
||||||
|
<property name="visibility">True</property>
|
||||||
|
<property name="max_length">0</property>
|
||||||
|
<property name="text" translatable="yes"></property>
|
||||||
|
<property name="has_frame">True</property>
|
||||||
|
<property name="invisible_char">*</property>
|
||||||
|
<property name="activates_default">False</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child internal-child="list">
|
||||||
|
<widget class="GtkList" id="convertwidget1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkListItem" id="convertwidget2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="convertwidget3">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes"></property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Ethernet</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="type">label_item</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkFrame" id="frame3">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label_xalign">0</property>
|
||||||
|
<property name="label_yalign">0.5</property>
|
||||||
|
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkHBox" id="hbox2">
|
||||||
|
<property name="border_width">5</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">True</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label5">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Device:</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkCombo" id="GtkCombo_Hdd">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="value_in_list">False</property>
|
||||||
|
<property name="allow_empty">True</property>
|
||||||
|
<property name="case_sensitive">False</property>
|
||||||
|
<property name="enable_arrow_keys">True</property>
|
||||||
|
<property name="enable_arrows_always">False</property>
|
||||||
|
|
||||||
|
<child internal-child="entry">
|
||||||
|
<widget class="GtkEntry" id="entry1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="editable">True</property>
|
||||||
|
<property name="visibility">True</property>
|
||||||
|
<property name="max_length">0</property>
|
||||||
|
<property name="text" translatable="yes"></property>
|
||||||
|
<property name="has_frame">True</property>
|
||||||
|
<property name="invisible_char">*</property>
|
||||||
|
<property name="activates_default">False</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child internal-child="list">
|
||||||
|
<widget class="GtkList" id="convertwidget4">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="selection_mode">GTK_SELECTION_BROWSE</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkListItem" id="convertwidget5">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="convertwidget6">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes"></property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label15">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Hdd</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="type">label_item</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkHButtonBox" id="hbuttonbox1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
|
||||||
|
<property name="spacing">30</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkButton" id="button1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_default">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes">Ok</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
<property name="focus_on_click">True</property>
|
||||||
|
<signal name="clicked" handler="OnConf_Ok"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkButton" id="button2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_default">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes">Cancel</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
<property name="focus_on_click">True</property>
|
||||||
|
<signal name="clicked" handler="OnConf_Cancel"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
<widget class="GtkWindow" id="About">
|
||||||
|
<property name="border_width">5</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="title" translatable="yes">DEV9about</property>
|
||||||
|
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||||
|
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||||
|
<property name="modal">False</property>
|
||||||
|
<property name="resizable">True</property>
|
||||||
|
<property name="destroy_with_parent">False</property>
|
||||||
|
<property name="decorated">True</property>
|
||||||
|
<property name="skip_taskbar_hint">False</property>
|
||||||
|
<property name="skip_pager_hint">False</property>
|
||||||
|
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||||
|
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||||
|
<property name="focus_on_map">True</property>
|
||||||
|
<property name="urgency_hint">False</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkVBox" id="vbox2">
|
||||||
|
<property name="border_width">5</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="homogeneous">False</property>
|
||||||
|
<property name="spacing">5</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Dev9 null Driver</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label3">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Original Author: linuzappz <linuzappz@hotmail.com>
|
||||||
|
Revised by arcum42@gmail.com</property>
|
||||||
|
<property name="use_underline">False</property>
|
||||||
|
<property name="use_markup">False</property>
|
||||||
|
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||||
|
<property name="wrap">False</property>
|
||||||
|
<property name="selectable">False</property>
|
||||||
|
<property name="xalign">0.5</property>
|
||||||
|
<property name="yalign">0.5</property>
|
||||||
|
<property name="xpad">0</property>
|
||||||
|
<property name="ypad">0</property>
|
||||||
|
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||||
|
<property name="width_chars">-1</property>
|
||||||
|
<property name="single_line_mode">False</property>
|
||||||
|
<property name="angle">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkHButtonBox" id="hbuttonbox2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="layout_style">GTK_BUTTONBOX_DEFAULT_STYLE</property>
|
||||||
|
<property name="spacing">30</property>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<widget class="GtkButton" id="button3">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_default">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="label" translatable="yes">Ok</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||||
|
<property name="focus_on_click">True</property>
|
||||||
|
<signal name="clicked" handler="OnAbout_Ok"/>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="padding">0</property>
|
||||||
|
<property name="expand">True</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
|
||||||
|
</glade-interface>
|
|
@ -0,0 +1,240 @@
|
||||||
|
/*
|
||||||
|
* DO NOT EDIT THIS FILE - it is generated by Glade.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <gdk/gdkkeysyms.h>
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
#include "callbacks.h"
|
||||||
|
#include "interface.h"
|
||||||
|
#include "support.h"
|
||||||
|
|
||||||
|
#define GLADE_HOOKUP_OBJECT(component,widget,name) \
|
||||||
|
g_object_set_data_full (G_OBJECT (component), name, \
|
||||||
|
gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
|
||||||
|
|
||||||
|
#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
|
||||||
|
g_object_set_data (G_OBJECT (component), name, widget)
|
||||||
|
|
||||||
|
GtkWidget*
|
||||||
|
create_Config (void)
|
||||||
|
{
|
||||||
|
GtkWidget *Config;
|
||||||
|
GtkWidget *vbox1;
|
||||||
|
GtkWidget *frame2;
|
||||||
|
GtkWidget *hbox1;
|
||||||
|
GtkWidget *label4;
|
||||||
|
GtkWidget *GtkCombo_Eth;
|
||||||
|
GList *GtkCombo_Eth_items = NULL;
|
||||||
|
GtkWidget *combo_entry1;
|
||||||
|
GtkWidget *label1;
|
||||||
|
GtkWidget *frame3;
|
||||||
|
GtkWidget *hbox2;
|
||||||
|
GtkWidget *label5;
|
||||||
|
GtkWidget *GtkCombo_Hdd;
|
||||||
|
GList *GtkCombo_Hdd_items = NULL;
|
||||||
|
GtkWidget *entry1;
|
||||||
|
GtkWidget *label15;
|
||||||
|
GtkWidget *hbuttonbox1;
|
||||||
|
GtkWidget *button1;
|
||||||
|
GtkWidget *button2;
|
||||||
|
|
||||||
|
Config = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
|
gtk_widget_set_name (Config, "Config");
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (Config), 5);
|
||||||
|
gtk_window_set_title (GTK_WINDOW (Config), _("DEV9config"));
|
||||||
|
|
||||||
|
vbox1 = gtk_vbox_new (FALSE, 5);
|
||||||
|
gtk_widget_set_name (vbox1, "vbox1");
|
||||||
|
gtk_widget_show (vbox1);
|
||||||
|
gtk_container_add (GTK_CONTAINER (Config), vbox1);
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (vbox1), 5);
|
||||||
|
|
||||||
|
frame2 = gtk_frame_new (NULL);
|
||||||
|
gtk_widget_set_name (frame2, "frame2");
|
||||||
|
gtk_widget_show (frame2);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox1), frame2, TRUE, TRUE, 0);
|
||||||
|
|
||||||
|
hbox1 = gtk_hbox_new (TRUE, 5);
|
||||||
|
gtk_widget_set_name (hbox1, "hbox1");
|
||||||
|
gtk_widget_show (hbox1);
|
||||||
|
gtk_container_add (GTK_CONTAINER (frame2), hbox1);
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (hbox1), 5);
|
||||||
|
|
||||||
|
label4 = gtk_label_new (_("Device:"));
|
||||||
|
gtk_widget_set_name (label4, "label4");
|
||||||
|
gtk_widget_show (label4);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox1), label4, FALSE, FALSE, 0);
|
||||||
|
gtk_label_set_justify (GTK_LABEL (label4), GTK_JUSTIFY_CENTER);
|
||||||
|
|
||||||
|
GtkCombo_Eth = gtk_combo_new ();
|
||||||
|
g_object_set_data (G_OBJECT (GTK_COMBO (GtkCombo_Eth)->popwin),
|
||||||
|
"GladeParentKey", GtkCombo_Eth);
|
||||||
|
gtk_widget_set_name (GtkCombo_Eth, "GtkCombo_Eth");
|
||||||
|
gtk_widget_show (GtkCombo_Eth);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox1), GtkCombo_Eth, FALSE, FALSE, 0);
|
||||||
|
GtkCombo_Eth_items = g_list_append (GtkCombo_Eth_items, (gpointer) "");
|
||||||
|
gtk_combo_set_popdown_strings (GTK_COMBO (GtkCombo_Eth), GtkCombo_Eth_items);
|
||||||
|
g_list_free (GtkCombo_Eth_items);
|
||||||
|
|
||||||
|
combo_entry1 = GTK_COMBO (GtkCombo_Eth)->entry;
|
||||||
|
gtk_widget_set_name (combo_entry1, "combo_entry1");
|
||||||
|
gtk_widget_show (combo_entry1);
|
||||||
|
|
||||||
|
label1 = gtk_label_new (_("Ethernet"));
|
||||||
|
gtk_widget_set_name (label1, "label1");
|
||||||
|
gtk_widget_show (label1);
|
||||||
|
gtk_frame_set_label_widget (GTK_FRAME (frame2), label1);
|
||||||
|
|
||||||
|
frame3 = gtk_frame_new (NULL);
|
||||||
|
gtk_widget_set_name (frame3, "frame3");
|
||||||
|
gtk_widget_show (frame3);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox1), frame3, TRUE, TRUE, 0);
|
||||||
|
|
||||||
|
hbox2 = gtk_hbox_new (TRUE, 5);
|
||||||
|
gtk_widget_set_name (hbox2, "hbox2");
|
||||||
|
gtk_widget_show (hbox2);
|
||||||
|
gtk_container_add (GTK_CONTAINER (frame3), hbox2);
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (hbox2), 5);
|
||||||
|
|
||||||
|
label5 = gtk_label_new (_("Device:"));
|
||||||
|
gtk_widget_set_name (label5, "label5");
|
||||||
|
gtk_widget_show (label5);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox2), label5, FALSE, FALSE, 0);
|
||||||
|
gtk_label_set_justify (GTK_LABEL (label5), GTK_JUSTIFY_CENTER);
|
||||||
|
|
||||||
|
GtkCombo_Hdd = gtk_combo_new ();
|
||||||
|
g_object_set_data (G_OBJECT (GTK_COMBO (GtkCombo_Hdd)->popwin),
|
||||||
|
"GladeParentKey", GtkCombo_Hdd);
|
||||||
|
gtk_widget_set_name (GtkCombo_Hdd, "GtkCombo_Hdd");
|
||||||
|
gtk_widget_show (GtkCombo_Hdd);
|
||||||
|
gtk_box_pack_start (GTK_BOX (hbox2), GtkCombo_Hdd, FALSE, FALSE, 0);
|
||||||
|
GtkCombo_Hdd_items = g_list_append (GtkCombo_Hdd_items, (gpointer) "");
|
||||||
|
gtk_combo_set_popdown_strings (GTK_COMBO (GtkCombo_Hdd), GtkCombo_Hdd_items);
|
||||||
|
g_list_free (GtkCombo_Hdd_items);
|
||||||
|
|
||||||
|
entry1 = GTK_COMBO (GtkCombo_Hdd)->entry;
|
||||||
|
gtk_widget_set_name (entry1, "entry1");
|
||||||
|
gtk_widget_show (entry1);
|
||||||
|
|
||||||
|
label15 = gtk_label_new (_("Hdd"));
|
||||||
|
gtk_widget_set_name (label15, "label15");
|
||||||
|
gtk_widget_show (label15);
|
||||||
|
gtk_frame_set_label_widget (GTK_FRAME (frame3), label15);
|
||||||
|
|
||||||
|
hbuttonbox1 = gtk_hbutton_box_new ();
|
||||||
|
gtk_widget_set_name (hbuttonbox1, "hbuttonbox1");
|
||||||
|
gtk_widget_show (hbuttonbox1);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, TRUE, TRUE, 0);
|
||||||
|
gtk_box_set_spacing (GTK_BOX (hbuttonbox1), 30);
|
||||||
|
|
||||||
|
button1 = gtk_button_new_with_mnemonic (_("Ok"));
|
||||||
|
gtk_widget_set_name (button1, "button1");
|
||||||
|
gtk_widget_show (button1);
|
||||||
|
gtk_container_add (GTK_CONTAINER (hbuttonbox1), button1);
|
||||||
|
GTK_WIDGET_SET_FLAGS (button1, GTK_CAN_DEFAULT);
|
||||||
|
|
||||||
|
button2 = gtk_button_new_with_mnemonic (_("Cancel"));
|
||||||
|
gtk_widget_set_name (button2, "button2");
|
||||||
|
gtk_widget_show (button2);
|
||||||
|
gtk_container_add (GTK_CONTAINER (hbuttonbox1), button2);
|
||||||
|
GTK_WIDGET_SET_FLAGS (button2, GTK_CAN_DEFAULT);
|
||||||
|
|
||||||
|
g_signal_connect ((gpointer) button1, "clicked",
|
||||||
|
G_CALLBACK (OnConf_Ok),
|
||||||
|
NULL);
|
||||||
|
g_signal_connect ((gpointer) button2, "clicked",
|
||||||
|
G_CALLBACK (OnConf_Cancel),
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
/* Store pointers to all widgets, for use by lookup_widget(). */
|
||||||
|
GLADE_HOOKUP_OBJECT_NO_REF (Config, Config, "Config");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, vbox1, "vbox1");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, frame2, "frame2");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, hbox1, "hbox1");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, label4, "label4");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, GtkCombo_Eth, "GtkCombo_Eth");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, combo_entry1, "combo_entry1");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, label1, "label1");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, frame3, "frame3");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, hbox2, "hbox2");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, label5, "label5");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, GtkCombo_Hdd, "GtkCombo_Hdd");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, entry1, "entry1");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, label15, "label15");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, hbuttonbox1, "hbuttonbox1");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, button1, "button1");
|
||||||
|
GLADE_HOOKUP_OBJECT (Config, button2, "button2");
|
||||||
|
|
||||||
|
return Config;
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkWidget*
|
||||||
|
create_About (void)
|
||||||
|
{
|
||||||
|
GtkWidget *About;
|
||||||
|
GtkWidget *vbox2;
|
||||||
|
GtkWidget *label2;
|
||||||
|
GtkWidget *label3;
|
||||||
|
GtkWidget *hbuttonbox2;
|
||||||
|
GtkWidget *button3;
|
||||||
|
|
||||||
|
About = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
|
gtk_widget_set_name (About, "About");
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (About), 5);
|
||||||
|
gtk_window_set_title (GTK_WINDOW (About), _("DEV9about"));
|
||||||
|
|
||||||
|
vbox2 = gtk_vbox_new (FALSE, 5);
|
||||||
|
gtk_widget_set_name (vbox2, "vbox2");
|
||||||
|
gtk_widget_show (vbox2);
|
||||||
|
gtk_container_add (GTK_CONTAINER (About), vbox2);
|
||||||
|
gtk_container_set_border_width (GTK_CONTAINER (vbox2), 5);
|
||||||
|
|
||||||
|
label2 = gtk_label_new (_("Dev9 null Driver"));
|
||||||
|
gtk_widget_set_name (label2, "label2");
|
||||||
|
gtk_widget_show (label2);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox2), label2, FALSE, FALSE, 0);
|
||||||
|
gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_CENTER);
|
||||||
|
|
||||||
|
label3 = gtk_label_new (_("Original Author: linuzappz <linuzappz@hotmail.com>\nRevised by arcum42@gmail.com"));
|
||||||
|
gtk_widget_set_name (label3, "label3");
|
||||||
|
gtk_widget_show (label3);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox2), label3, FALSE, FALSE, 0);
|
||||||
|
|
||||||
|
hbuttonbox2 = gtk_hbutton_box_new ();
|
||||||
|
gtk_widget_set_name (hbuttonbox2, "hbuttonbox2");
|
||||||
|
gtk_widget_show (hbuttonbox2);
|
||||||
|
gtk_box_pack_start (GTK_BOX (vbox2), hbuttonbox2, TRUE, TRUE, 0);
|
||||||
|
gtk_box_set_spacing (GTK_BOX (hbuttonbox2), 30);
|
||||||
|
|
||||||
|
button3 = gtk_button_new_with_mnemonic (_("Ok"));
|
||||||
|
gtk_widget_set_name (button3, "button3");
|
||||||
|
gtk_widget_show (button3);
|
||||||
|
gtk_container_add (GTK_CONTAINER (hbuttonbox2), button3);
|
||||||
|
GTK_WIDGET_SET_FLAGS (button3, GTK_CAN_DEFAULT);
|
||||||
|
|
||||||
|
g_signal_connect ((gpointer) button3, "clicked",
|
||||||
|
G_CALLBACK (OnAbout_Ok),
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
/* Store pointers to all widgets, for use by lookup_widget(). */
|
||||||
|
GLADE_HOOKUP_OBJECT_NO_REF (About, About, "About");
|
||||||
|
GLADE_HOOKUP_OBJECT (About, vbox2, "vbox2");
|
||||||
|
GLADE_HOOKUP_OBJECT (About, label2, "label2");
|
||||||
|
GLADE_HOOKUP_OBJECT (About, label3, "label3");
|
||||||
|
GLADE_HOOKUP_OBJECT (About, hbuttonbox2, "hbuttonbox2");
|
||||||
|
GLADE_HOOKUP_OBJECT (About, button3, "button3");
|
||||||
|
|
||||||
|
return About;
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
/*
|
||||||
|
* DO NOT EDIT THIS FILE - it is generated by Glade.
|
||||||
|
*/
|
||||||
|
|
||||||
|
GtkWidget* create_Config (void);
|
||||||
|
GtkWidget* create_About (void);
|
|
@ -0,0 +1,144 @@
|
||||||
|
/*
|
||||||
|
* DO NOT EDIT THIS FILE - it is generated by Glade.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
#include "support.h"
|
||||||
|
|
||||||
|
GtkWidget*
|
||||||
|
lookup_widget (GtkWidget *widget,
|
||||||
|
const gchar *widget_name)
|
||||||
|
{
|
||||||
|
GtkWidget *parent, *found_widget;
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
if (GTK_IS_MENU (widget))
|
||||||
|
parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
|
||||||
|
else
|
||||||
|
parent = widget->parent;
|
||||||
|
if (!parent)
|
||||||
|
parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey");
|
||||||
|
if (parent == NULL)
|
||||||
|
break;
|
||||||
|
widget = parent;
|
||||||
|
}
|
||||||
|
|
||||||
|
found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
|
||||||
|
widget_name);
|
||||||
|
if (!found_widget)
|
||||||
|
g_warning ("Widget not found: %s", widget_name);
|
||||||
|
return found_widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
static GList *pixmaps_directories = NULL;
|
||||||
|
|
||||||
|
/* Use this function to set the directory containing installed pixmaps. */
|
||||||
|
void
|
||||||
|
add_pixmap_directory (const gchar *directory)
|
||||||
|
{
|
||||||
|
pixmaps_directories = g_list_prepend (pixmaps_directories,
|
||||||
|
g_strdup (directory));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This is an internally used function to find pixmap files. */
|
||||||
|
static gchar*
|
||||||
|
find_pixmap_file (const gchar *filename)
|
||||||
|
{
|
||||||
|
GList *elem;
|
||||||
|
|
||||||
|
/* We step through each of the pixmaps directory to find it. */
|
||||||
|
elem = pixmaps_directories;
|
||||||
|
while (elem)
|
||||||
|
{
|
||||||
|
gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
|
||||||
|
G_DIR_SEPARATOR_S, filename);
|
||||||
|
if (g_file_test (pathname, G_FILE_TEST_EXISTS))
|
||||||
|
return pathname;
|
||||||
|
g_free (pathname);
|
||||||
|
elem = elem->next;
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This is an internally used function to create pixmaps. */
|
||||||
|
GtkWidget*
|
||||||
|
create_pixmap (GtkWidget *widget,
|
||||||
|
const gchar *filename)
|
||||||
|
{
|
||||||
|
gchar *pathname = NULL;
|
||||||
|
GtkWidget *pixmap;
|
||||||
|
|
||||||
|
if (!filename || !filename[0])
|
||||||
|
return gtk_image_new ();
|
||||||
|
|
||||||
|
pathname = find_pixmap_file (filename);
|
||||||
|
|
||||||
|
if (!pathname)
|
||||||
|
{
|
||||||
|
g_warning (_("Couldn't find pixmap file: %s"), filename);
|
||||||
|
return gtk_image_new ();
|
||||||
|
}
|
||||||
|
|
||||||
|
pixmap = gtk_image_new_from_file (pathname);
|
||||||
|
g_free (pathname);
|
||||||
|
return pixmap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This is an internally used function to create pixmaps. */
|
||||||
|
GdkPixbuf*
|
||||||
|
create_pixbuf (const gchar *filename)
|
||||||
|
{
|
||||||
|
gchar *pathname = NULL;
|
||||||
|
GdkPixbuf *pixbuf;
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
|
if (!filename || !filename[0])
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
pathname = find_pixmap_file (filename);
|
||||||
|
|
||||||
|
if (!pathname)
|
||||||
|
{
|
||||||
|
g_warning (_("Couldn't find pixmap file: %s"), filename);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
|
||||||
|
if (!pixbuf)
|
||||||
|
{
|
||||||
|
fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
|
||||||
|
pathname, error->message);
|
||||||
|
g_error_free (error);
|
||||||
|
}
|
||||||
|
g_free (pathname);
|
||||||
|
return pixbuf;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* This is used to set ATK action descriptions. */
|
||||||
|
void
|
||||||
|
glade_set_atk_action_description (AtkAction *action,
|
||||||
|
const gchar *action_name,
|
||||||
|
const gchar *description)
|
||||||
|
{
|
||||||
|
gint n_actions, i;
|
||||||
|
|
||||||
|
n_actions = atk_action_get_n_actions (action);
|
||||||
|
for (i = 0; i < n_actions; i++)
|
||||||
|
{
|
||||||
|
if (!strcmp (atk_action_get_name (action, i), action_name))
|
||||||
|
atk_action_set_description (action, i, description);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
/*
|
||||||
|
* DO NOT EDIT THIS FILE - it is generated by Glade.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Standard gettext macros.
|
||||||
|
*/
|
||||||
|
#ifdef ENABLE_NLS
|
||||||
|
# include <libintl.h>
|
||||||
|
# undef _
|
||||||
|
# define _(String) dgettext (PACKAGE, String)
|
||||||
|
# define Q_(String) g_strip_context ((String), gettext (String))
|
||||||
|
# ifdef gettext_noop
|
||||||
|
# define N_(String) gettext_noop (String)
|
||||||
|
# else
|
||||||
|
# define N_(String) (String)
|
||||||
|
# endif
|
||||||
|
#else
|
||||||
|
# define textdomain(String) (String)
|
||||||
|
# define gettext(String) (String)
|
||||||
|
# define dgettext(Domain,Message) (Message)
|
||||||
|
# define dcgettext(Domain,Message,Type) (Message)
|
||||||
|
# define bindtextdomain(Domain,Directory) (Domain)
|
||||||
|
# define _(String) (String)
|
||||||
|
# define Q_(String) g_strip_context ((String), (String))
|
||||||
|
# define N_(String) (String)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Public Functions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This function returns a widget in a component created by Glade.
|
||||||
|
* Call it with the toplevel widget in the component (i.e. a window/dialog),
|
||||||
|
* or alternatively any widget in the component, and the name of the widget
|
||||||
|
* you want returned.
|
||||||
|
*/
|
||||||
|
GtkWidget* lookup_widget (GtkWidget *widget,
|
||||||
|
const gchar *widget_name);
|
||||||
|
|
||||||
|
|
||||||
|
/* Use this function to set the directory containing installed pixmaps. */
|
||||||
|
void add_pixmap_directory (const gchar *directory);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Private Functions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* This is used to create the pixmaps used in the interface. */
|
||||||
|
GtkWidget* create_pixmap (GtkWidget *widget,
|
||||||
|
const gchar *filename);
|
||||||
|
|
||||||
|
/* This is used to create the pixbufs used in the interface. */
|
||||||
|
GdkPixbuf* create_pixbuf (const gchar *filename);
|
||||||
|
|
||||||
|
/* This is used to set ATK action descriptions. */
|
||||||
|
void glade_set_atk_action_description (AtkAction *action,
|
||||||
|
const gchar *action_name,
|
||||||
|
const gchar *description);
|
||||||
|
|
|
@ -112,3 +112,12 @@ OnConf_Ok (GtkButton *button,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
OnAbout_Ok (GtkDialog *dialog,
|
||||||
|
gint response_id,
|
||||||
|
gpointer user_data)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,3 +52,8 @@ OnConf_Cancel (GtkButton *button,
|
||||||
void
|
void
|
||||||
OnConf_Ok (GtkButton *button,
|
OnConf_Ok (GtkButton *button,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
|
void
|
||||||
|
OnAbout_Ok (GtkDialog *dialog,
|
||||||
|
gint response_id,
|
||||||
|
gpointer user_data);
|
||||||
|
|
|
@ -270,9 +270,10 @@ void OnConf_Cancel(GtkButton *button, gpointer user_data)
|
||||||
|
|
||||||
GtkWidget *About = NULL;
|
GtkWidget *About = NULL;
|
||||||
|
|
||||||
void OnAbout_Ok(GtkButton *button, gpointer user_data)
|
//void OnAbout_Ok(GtkButton *button, gpointer user_data)
|
||||||
|
void OnAbout_Ok(GtkDialog *About, gint response_id, gpointer user_data)
|
||||||
{
|
{
|
||||||
gtk_widget_destroy(About);
|
gtk_widget_destroy(GTK_WIDGET(About));
|
||||||
gtk_main_quit();
|
gtk_main_quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,11 +44,16 @@ create_About (void)
|
||||||
About = gtk_about_dialog_new ();
|
About = gtk_about_dialog_new ();
|
||||||
gtk_widget_set_name (About, "About");
|
gtk_widget_set_name (About, "About");
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (About), 5);
|
gtk_container_set_border_width (GTK_CONTAINER (About), 5);
|
||||||
|
gtk_window_set_destroy_with_parent (GTK_WINDOW (About), TRUE);
|
||||||
gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (About), VERSION);
|
gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (About), VERSION);
|
||||||
gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (About), _("ZeroPAD"));
|
gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (About), _("ZeroPAD"));
|
||||||
gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (About), authors);
|
gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (About), authors);
|
||||||
gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (About), translators);
|
gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (About), translators);
|
||||||
|
|
||||||
|
g_signal_connect ((gpointer) About, "response",
|
||||||
|
G_CALLBACK (OnAbout_Ok),
|
||||||
|
NULL);
|
||||||
|
|
||||||
/* Store pointers to all widgets, for use by lookup_widget(). */
|
/* Store pointers to all widgets, for use by lookup_widget(). */
|
||||||
GLADE_HOOKUP_OBJECT_NO_REF (About, About, "About");
|
GLADE_HOOKUP_OBJECT_NO_REF (About, About, "About");
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<widget class="GtkAboutDialog" id="About">
|
<widget class="GtkAboutDialog" id="About">
|
||||||
<property name="border_width">5</property>
|
<property name="border_width">5</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="destroy_with_parent">False</property>
|
<property name="destroy_with_parent">True</property>
|
||||||
<property name="name" translatable="yes">ZeroPAD</property>
|
<property name="name" translatable="yes">ZeroPAD</property>
|
||||||
<property name="wrap_license">False</property>
|
<property name="wrap_license">False</property>
|
||||||
<property name="authors">Author: zerofrog(@gmail.com)
|
<property name="authors">Author: zerofrog(@gmail.com)
|
||||||
|
@ -15,6 +15,7 @@ Thanks to:
|
||||||
florin sasu <florinsasu@hotmail.com>
|
florin sasu <florinsasu@hotmail.com>
|
||||||
and SSSPSXPad, TwinPad authors</property>
|
and SSSPSXPad, TwinPad authors</property>
|
||||||
<property name="translator_credits" translatable="yes" comments="TRANSLATORS: Replace this string with your names, one name per line.">translator-credits</property>
|
<property name="translator_credits" translatable="yes" comments="TRANSLATORS: Replace this string with your names, one name per line.">translator-credits</property>
|
||||||
|
<signal name="response" handler="OnAbout_Ok" last_modification_time="Fri, 15 May 2009 05:54:57 GMT"/>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
<widget class="GtkDialog" id="Conf">
|
<widget class="GtkDialog" id="Conf">
|
||||||
|
|
Loading…
Reference in New Issue