From c34bb28087ceff7c3dbfb924dd5ac4b82310180a Mon Sep 17 00:00:00 2001 From: "gregory.hainaut" Date: Thu, 10 Jun 2010 17:38:09 +0000 Subject: [PATCH] [gsnull, padnull, spu2null] : remove the deprecated glade interface. Note: I updated the codeblock xml to remove the file. It is normaly ok but I do not test it (only cmake one^^) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3195 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/GSnull/CMakeLists.txt | 10 +- plugins/GSnull/Linux/Config.cpp | 98 +----- plugins/GSnull/Linux/Config.h | 1 - plugins/GSnull/Linux/GSnull.cbp | 10 - plugins/GSnull/Linux/Linux.cpp | 22 -- plugins/GSnull/Linux/callbacks.c | 34 --- plugins/GSnull/Linux/callbacks.h | 14 - plugins/GSnull/Linux/gsnull.glade | 443 ---------------------------- plugins/GSnull/Linux/interface.c | 240 --------------- plugins/GSnull/Linux/interface.h | 6 - plugins/GSnull/Linux/support.c | 144 --------- plugins/GSnull/Linux/support.h | 69 ----- plugins/PadNull/CMakeLists.txt | 10 +- plugins/PadNull/Linux/Config.cpp | 97 +----- plugins/PadNull/Linux/PadNull.cbp | 10 - plugins/PadNull/Linux/callbacks.c | 34 --- plugins/PadNull/Linux/callbacks.h | 14 - plugins/PadNull/Linux/interface.c | 173 ----------- plugins/PadNull/Linux/interface.h | 6 - plugins/PadNull/Linux/pad.glade | 240 --------------- plugins/PadNull/Linux/support.c | 144 --------- plugins/PadNull/Linux/support.h | 69 ----- plugins/SPU2null/CMakeLists.txt | 10 +- plugins/SPU2null/Linux/Config.cpp | 89 +----- plugins/SPU2null/Linux/SPU2null.cbp | 10 - plugins/SPU2null/Linux/callbacks.c | 34 --- plugins/SPU2null/Linux/callbacks.h | 14 - plugins/SPU2null/Linux/interface.c | 173 ----------- plugins/SPU2null/Linux/interface.h | 6 - plugins/SPU2null/Linux/spu2.glade | 241 --------------- plugins/SPU2null/Linux/support.c | 144 --------- plugins/SPU2null/Linux/support.h | 69 ----- 32 files changed, 10 insertions(+), 2668 deletions(-) delete mode 100644 plugins/GSnull/Linux/callbacks.c delete mode 100644 plugins/GSnull/Linux/callbacks.h delete mode 100644 plugins/GSnull/Linux/gsnull.glade delete mode 100644 plugins/GSnull/Linux/interface.c delete mode 100644 plugins/GSnull/Linux/interface.h delete mode 100644 plugins/GSnull/Linux/support.c delete mode 100644 plugins/GSnull/Linux/support.h delete mode 100644 plugins/PadNull/Linux/callbacks.c delete mode 100644 plugins/PadNull/Linux/callbacks.h delete mode 100644 plugins/PadNull/Linux/interface.c delete mode 100644 plugins/PadNull/Linux/interface.h delete mode 100644 plugins/PadNull/Linux/pad.glade delete mode 100644 plugins/PadNull/Linux/support.c delete mode 100644 plugins/PadNull/Linux/support.h delete mode 100644 plugins/SPU2null/Linux/callbacks.c delete mode 100644 plugins/SPU2null/Linux/callbacks.h delete mode 100644 plugins/SPU2null/Linux/interface.c delete mode 100644 plugins/SPU2null/Linux/interface.h delete mode 100644 plugins/SPU2null/Linux/spu2.glade delete mode 100644 plugins/SPU2null/Linux/support.c delete mode 100644 plugins/SPU2null/Linux/support.h diff --git a/plugins/GSnull/CMakeLists.txt b/plugins/GSnull/CMakeLists.txt index c1cb56934..a06b3a091 100644 --- a/plugins/GSnull/CMakeLists.txt +++ b/plugins/GSnull/CMakeLists.txt @@ -46,21 +46,15 @@ set(GSnullHeaders # GSnull Linux sources set(GSnullLinuxSources -# Linux/callbacks.c Linux/Config.cpp Linux/GSLinux.cpp - Linux/interface.c - Linux/Linux.cpp - Linux/support.c) + Linux/Linux.cpp) # GSnull Linux headers set(GSnullLinuxHeaders - Linux/callbacks.h Linux/Config.h Linux/GSLinux.h - Linux/interface.h - Linux/Linux.h - Linux/support.h) + Linux/Linux.h) # GSnull null sources set(GSnullnullSources diff --git a/plugins/GSnull/Linux/Config.cpp b/plugins/GSnull/Linux/Config.cpp index 66291484d..5e9b51f3b 100644 --- a/plugins/GSnull/Linux/Config.cpp +++ b/plugins/GSnull/Linux/Config.cpp @@ -16,108 +16,18 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include -#include -#include -#include -#include -#include #include using namespace std; #include "GS.h" #include "Config.h" - #ifdef __cplusplus -extern "C" -{ -#endif - -#include "support.h" -#include "callbacks.h" -#include "interface.h" - -#ifdef __cplusplus -} -#endif - -GtkWidget *MsgDlg, *About, *Conf; extern string s_strIniPath; PluginConf Ini; -void OnMsg_Ok() -{ - gtk_widget_destroy(MsgDlg); - gtk_main_quit(); -} - -void cfgSysMessage(char *fmt, ...) -{ - GtkWidget *Ok,*Txt; - GtkWidget *Box,*Box1; - va_list list; - char msg[512]; - - va_start(list, fmt); - vsprintf(msg, fmt, list); - va_end(list); - - if (msg[strlen(msg) - 1] == '\n') msg[strlen(msg)-1] = 0; - - MsgDlg = gtk_window_new (GTK_WINDOW_POPUP); - gtk_window_set_position(GTK_WINDOW(MsgDlg), GTK_WIN_POS_CENTER); - gtk_window_set_title(GTK_WINDOW(MsgDlg), "FireWire Msg"); - gtk_container_set_border_width(GTK_CONTAINER(MsgDlg), 5); - - Box = gtk_vbox_new(5, 0); - gtk_container_add(GTK_CONTAINER(MsgDlg), Box); - gtk_widget_show(Box); - - Txt = gtk_label_new(msg); - - gtk_box_pack_start(GTK_BOX(Box), Txt, FALSE, FALSE, 5); - gtk_widget_show(Txt); - - Box1 = gtk_hbutton_box_new(); - gtk_box_pack_start(GTK_BOX(Box), Box1, FALSE, FALSE, 0); - gtk_widget_show(Box1); - - Ok = gtk_button_new_with_label("Ok"); - gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnMsg_Ok), NULL); - gtk_container_add(GTK_CONTAINER(Box1), Ok); - GTK_WIDGET_SET_FLAGS(Ok, GTK_CAN_DEFAULT); - gtk_widget_show(Ok); - - gtk_widget_show(MsgDlg); - - gtk_main(); -} - -void OnAbout_Ok(GtkButton *button, gpointer user_data) -{ - gtk_widget_destroy(About); - gtk_main_quit(); -} - void CFGabout() { - About = create_About(); - gtk_widget_show_all(About); - gtk_main(); -} - -void OnConf_Ok(GtkButton *button, gpointer user_data) { - SaveConfig(); - - gtk_widget_destroy(Conf); - gtk_main_quit(); -} - -void OnConf_Cancel(GtkButton *button, gpointer user_data) -{ - gtk_widget_destroy(Conf); - gtk_main_quit(); + SysMessage("GSnull: A simple null plugin."); } void CFGconfigure() @@ -127,12 +37,6 @@ void CFGconfigure() SaveConfig(); } -long CFGmessage(char *msg) { - cfgSysMessage(msg); - - return 0; -} - void LoadConfig() { const std::string iniFile(s_strIniPath + "/GSNull.ini"); diff --git a/plugins/GSnull/Linux/Config.h b/plugins/GSnull/Linux/Config.h index fca002d5b..6de1f01d9 100644 --- a/plugins/GSnull/Linux/Config.h +++ b/plugins/GSnull/Linux/Config.h @@ -21,5 +21,4 @@ void LoadConf(); extern long CFGmessage(char *msg); extern void CFGconfigure(); -extern void cfgSysMessage(char *fmt, ...); extern void CFGabout(); diff --git a/plugins/GSnull/Linux/GSnull.cbp b/plugins/GSnull/Linux/GSnull.cbp index 161072847..7bf155e1b 100644 --- a/plugins/GSnull/Linux/GSnull.cbp +++ b/plugins/GSnull/Linux/GSnull.cbp @@ -58,16 +58,6 @@ - - - - - - - - diff --git a/plugins/GSnull/Linux/Linux.cpp b/plugins/GSnull/Linux/Linux.cpp index f630d6336..f1cd677a7 100644 --- a/plugins/GSnull/Linux/Linux.cpp +++ b/plugins/GSnull/Linux/Linux.cpp @@ -16,31 +16,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include -#include -#include -#include -#include -#include -#include - #include "GS.h" #include "Config.h" -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 GSconfigure() { CFGconfigure(); diff --git a/plugins/GSnull/Linux/callbacks.c b/plugins/GSnull/Linux/callbacks.c deleted file mode 100644 index e87ed8be2..000000000 --- a/plugins/GSnull/Linux/callbacks.c +++ /dev/null @@ -1,34 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include - -#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) -{ - -} - diff --git a/plugins/GSnull/Linux/callbacks.h b/plugins/GSnull/Linux/callbacks.h deleted file mode 100644 index e606c242f..000000000 --- a/plugins/GSnull/Linux/callbacks.h +++ /dev/null @@ -1,14 +0,0 @@ -#include - - -void -OnConf_Ok (GtkButton *button, - gpointer user_data); - -void -OnConf_Cancel (GtkButton *button, - gpointer user_data); - -void -OnAbout_Ok (GtkButton *button, - gpointer user_data); diff --git a/plugins/GSnull/Linux/gsnull.glade b/plugins/GSnull/Linux/gsnull.glade deleted file mode 100644 index cef4eab65..000000000 --- a/plugins/GSnull/Linux/gsnull.glade +++ /dev/null @@ -1,443 +0,0 @@ - - - - - - - 5 - True - DEV9config - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - 5 - True - False - 5 - - - - True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN - - - - 5 - True - True - 5 - - - - True - Device: - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - True - False - True - False - - - - True - True - True - True - 0 - - True - * - False - - - - - - True - GTK_SELECTION_BROWSE - - - - True - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - - - - - - - 0 - False - False - - - - - - - - True - Ethernet - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - True - True - - - - - - True - 0 - 0.5 - GTK_SHADOW_ETCHED_IN - - - - 5 - True - True - 5 - - - - True - Device: - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - True - False - True - False - - - - True - True - True - True - 0 - - True - * - False - - - - - - True - GTK_SELECTION_BROWSE - - - - True - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - - - - - - - 0 - False - False - - - - - - - - True - Hdd - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - True - True - - - - - - True - GTK_BUTTONBOX_DEFAULT_STYLE - 30 - - - - True - True - True - Ok - True - GTK_RELIEF_NORMAL - True - - - - - - - True - True - True - Cancel - True - GTK_RELIEF_NORMAL - True - - - - - - 0 - True - True - - - - - - - - 5 - True - DEV9about - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - 5 - True - False - 5 - - - - True - FireWire Driver - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - Author: linuzappz <linuzappz@hotmail.com> - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - GTK_BUTTONBOX_DEFAULT_STYLE - 30 - - - - True - True - True - Ok - True - GTK_RELIEF_NORMAL - True - - - - - - 0 - True - True - - - - - - - diff --git a/plugins/GSnull/Linux/interface.c b/plugins/GSnull/Linux/interface.c deleted file mode 100644 index 5c23358a2..000000000 --- a/plugins/GSnull/Linux/interface.c +++ /dev/null @@ -1,240 +0,0 @@ -/* - * DO NOT EDIT THIS FILE - it is generated by Glade. - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include - -#include -#include - -#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 (_("FireWire 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 (_("Author: linuzappz ")); - 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; -} - diff --git a/plugins/GSnull/Linux/interface.h b/plugins/GSnull/Linux/interface.h deleted file mode 100644 index 69c303ba3..000000000 --- a/plugins/GSnull/Linux/interface.h +++ /dev/null @@ -1,6 +0,0 @@ -/* - * DO NOT EDIT THIS FILE - it is generated by Glade. - */ - -GtkWidget* create_Config (void); -GtkWidget* create_About (void); diff --git a/plugins/GSnull/Linux/support.c b/plugins/GSnull/Linux/support.c deleted file mode 100644 index 00aff2982..000000000 --- a/plugins/GSnull/Linux/support.c +++ /dev/null @@ -1,144 +0,0 @@ -/* - * DO NOT EDIT THIS FILE - it is generated by Glade. - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include - -#include - -#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); - } -} - diff --git a/plugins/GSnull/Linux/support.h b/plugins/GSnull/Linux/support.h deleted file mode 100644 index a32649e53..000000000 --- a/plugins/GSnull/Linux/support.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * DO NOT EDIT THIS FILE - it is generated by Glade. - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include - -/* - * Standard gettext macros. - */ -#ifdef ENABLE_NLS -# include -# 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); - diff --git a/plugins/PadNull/CMakeLists.txt b/plugins/PadNull/CMakeLists.txt index c45e305d9..4e5cec7c1 100644 --- a/plugins/PadNull/CMakeLists.txt +++ b/plugins/PadNull/CMakeLists.txt @@ -42,19 +42,13 @@ set(PadNullHeaders # PadNull Linux sources set(PadNullLinuxSources -# Linllux/callbacks.c Linux/Config.cpp - Linux/interface.c - Linux/PadLinux.cpp - Linux/support.c) + Linux/PadLinux.cpp) # PadNull Linux headers set(PadNullLinuxHeaders - Linux/callbacks.h Linux/Config.h - Linux/interface.h - Linux/PadLinux.h - Linux/support.h) + Linux/PadLinux.h) # PadNull Windows sources set(PadNullWindowsSources diff --git a/plugins/PadNull/Linux/Config.cpp b/plugins/PadNull/Linux/Config.cpp index 1fbeaec18..2371d7d50 100644 --- a/plugins/PadNull/Linux/Config.cpp +++ b/plugins/PadNull/Linux/Config.cpp @@ -1,4 +1,4 @@ -/* FWnull +/* PADnull * Copyright (C) 2004-2009 PCSX2 Team * * This program is free software; you can redistribute it and/or modify @@ -16,110 +16,18 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include -#include -#include -#include -#include -#include -#include #include using namespace std; #include "Pad.h" #include "Config.h" - #ifdef __cplusplus -extern "C" -{ -#endif - -#include "support.h" -#include "callbacks.h" -#include "interface.h" - -#ifdef __cplusplus -} -#endif - -GtkWidget *MsgDlg, *About, *Conf; extern string s_strIniPath; PluginConf Ini; -void OnMsg_Ok() -{ - gtk_widget_destroy(MsgDlg); - gtk_main_quit(); -} - -void SysMessage(char *fmt, ...) -{ - GtkWidget *Ok,*Txt; - GtkWidget *Box,*Box1; - va_list list; - char msg[512]; - - va_start(list, fmt); - vsprintf(msg, fmt, list); - va_end(list); - - if (msg[strlen(msg) - 1] == '\n') msg[strlen(msg)-1] = 0; - - MsgDlg = gtk_window_new (GTK_WINDOW_POPUP); - gtk_window_set_position(GTK_WINDOW(MsgDlg), GTK_WIN_POS_CENTER); - gtk_window_set_title(GTK_WINDOW(MsgDlg), "FireWire Msg"); - gtk_container_set_border_width(GTK_CONTAINER(MsgDlg), 5); - - Box = gtk_vbox_new(5, 0); - gtk_container_add(GTK_CONTAINER(MsgDlg), Box); - gtk_widget_show(Box); - - Txt = gtk_label_new(msg); - - gtk_box_pack_start(GTK_BOX(Box), Txt, FALSE, FALSE, 5); - gtk_widget_show(Txt); - - Box1 = gtk_hbutton_box_new(); - gtk_box_pack_start(GTK_BOX(Box), Box1, FALSE, FALSE, 0); - gtk_widget_show(Box1); - - Ok = gtk_button_new_with_label("Ok"); - gtk_signal_connect (GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnMsg_Ok), NULL); - gtk_container_add(GTK_CONTAINER(Box1), Ok); - GTK_WIDGET_SET_FLAGS(Ok, GTK_CAN_DEFAULT); - gtk_widget_show(Ok); - - gtk_widget_show(MsgDlg); - - gtk_main(); -} - -void OnAbout_Ok(GtkButton *button, gpointer user_data) -{ - gtk_widget_destroy(About); - gtk_main_quit(); -} - EXPORT_C_(void) PADabout() { - About = create_About(); - gtk_widget_show_all(About); - gtk_main(); -} - -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(); + SysMessage("PADnull: A simple null plugin."); } EXPORT_C_(void) PADconfigure() @@ -157,4 +65,3 @@ void SaveConfig() Ini.WriteInt("logging", conf.Log); Ini.Close(); } - diff --git a/plugins/PadNull/Linux/PadNull.cbp b/plugins/PadNull/Linux/PadNull.cbp index 4ff56e801..19d754975 100644 --- a/plugins/PadNull/Linux/PadNull.cbp +++ b/plugins/PadNull/Linux/PadNull.cbp @@ -50,16 +50,6 @@ - - - - - - - - diff --git a/plugins/PadNull/Linux/callbacks.c b/plugins/PadNull/Linux/callbacks.c deleted file mode 100644 index e87ed8be2..000000000 --- a/plugins/PadNull/Linux/callbacks.c +++ /dev/null @@ -1,34 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include - -#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) -{ - -} - diff --git a/plugins/PadNull/Linux/callbacks.h b/plugins/PadNull/Linux/callbacks.h deleted file mode 100644 index e606c242f..000000000 --- a/plugins/PadNull/Linux/callbacks.h +++ /dev/null @@ -1,14 +0,0 @@ -#include - - -void -OnConf_Ok (GtkButton *button, - gpointer user_data); - -void -OnConf_Cancel (GtkButton *button, - gpointer user_data); - -void -OnAbout_Ok (GtkButton *button, - gpointer user_data); diff --git a/plugins/PadNull/Linux/interface.c b/plugins/PadNull/Linux/interface.c deleted file mode 100644 index 18efe01d5..000000000 --- a/plugins/PadNull/Linux/interface.c +++ /dev/null @@ -1,173 +0,0 @@ -/* - * DO NOT EDIT THIS FILE - it is generated by Glade. - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include - -#include -#include - -#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), _("Padconfig")); - - 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 (_("Logging")); - 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), _("FWabout")); - - 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 (_("PadNull 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: 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; -} - diff --git a/plugins/PadNull/Linux/interface.h b/plugins/PadNull/Linux/interface.h deleted file mode 100644 index 69c303ba3..000000000 --- a/plugins/PadNull/Linux/interface.h +++ /dev/null @@ -1,6 +0,0 @@ -/* - * DO NOT EDIT THIS FILE - it is generated by Glade. - */ - -GtkWidget* create_Config (void); -GtkWidget* create_About (void); diff --git a/plugins/PadNull/Linux/pad.glade b/plugins/PadNull/Linux/pad.glade deleted file mode 100644 index 8a407e0fb..000000000 --- a/plugins/PadNull/Linux/pad.glade +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - 5 - True - Padconfig - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - 5 - True - False - 5 - - - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 0 - 12 - 0 - - - - True - True - Enable Logging - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - - - - - True - <b>Logging</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - True - True - - - - - - True - GTK_BUTTONBOX_DEFAULT_STYLE - 30 - - - - True - True - True - Ok - True - GTK_RELIEF_NORMAL - True - - - - - - - True - True - True - Cancel - True - GTK_RELIEF_NORMAL - True - - - - - - 0 - True - True - - - - - - - - 5 - True - FWabout - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - 5 - True - False - 5 - - - - True - PadNull Driver - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - Original Author: arcum42@gmail.com - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - GTK_BUTTONBOX_DEFAULT_STYLE - 30 - - - - True - True - True - Ok - True - GTK_RELIEF_NORMAL - True - - - - - - 0 - True - True - - - - - - - diff --git a/plugins/PadNull/Linux/support.c b/plugins/PadNull/Linux/support.c deleted file mode 100644 index 00aff2982..000000000 --- a/plugins/PadNull/Linux/support.c +++ /dev/null @@ -1,144 +0,0 @@ -/* - * DO NOT EDIT THIS FILE - it is generated by Glade. - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include - -#include - -#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); - } -} - diff --git a/plugins/PadNull/Linux/support.h b/plugins/PadNull/Linux/support.h deleted file mode 100644 index a32649e53..000000000 --- a/plugins/PadNull/Linux/support.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * DO NOT EDIT THIS FILE - it is generated by Glade. - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include - -/* - * Standard gettext macros. - */ -#ifdef ENABLE_NLS -# include -# 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); - diff --git a/plugins/SPU2null/CMakeLists.txt b/plugins/SPU2null/CMakeLists.txt index f9d49df37..dbbffcb8f 100644 --- a/plugins/SPU2null/CMakeLists.txt +++ b/plugins/SPU2null/CMakeLists.txt @@ -42,17 +42,11 @@ set(SPU2nullHeaders # SPU2null Linux sources set(SPU2nullLinuxSources -# Linux/callbacks.c - Linux/Config.cpp - Linux/interface.c - Linux/support.c) + Linux/Config.cpp) # SPU2null Linux headers set(SPU2nullLinuxHeaders - Linux/callbacks.h - Linux/Config.h - Linux/interface.h - Linux/support.h) + Linux/Config.h) # SPU2null Windows sources set(SPU2nullWindowsSources diff --git a/plugins/SPU2null/Linux/Config.cpp b/plugins/SPU2null/Linux/Config.cpp index 04b78a51e..b2f747c9c 100644 --- a/plugins/SPU2null/Linux/Config.cpp +++ b/plugins/SPU2null/Linux/Config.cpp @@ -18,95 +18,11 @@ #include "Config.h" #include "SPU2.h" - - #ifdef __cplusplus -extern "C" -{ -#endif - -#include "support.h" -#include "callbacks.h" -#include "interface.h" - -#ifdef __cplusplus -} -#endif - using namespace std; -GtkWidget *MsgDlg, *About, *Conf; extern string s_strIniPath; PluginConf Ini; -void OnMsg_Ok() -{ - gtk_widget_destroy(MsgDlg); - gtk_main_quit(); -} - -void SysMessage(char *fmt, ...) -{ - GtkWidget *Ok, *Txt; - GtkWidget *Box, *Box1; - va_list list; - char msg[512]; - - va_start(list, fmt); - vsprintf(msg, fmt, list); - va_end(list); - - if (msg[strlen(msg)-1] == '\n') msg[strlen(msg)-1] = 0; - - MsgDlg = gtk_window_new(GTK_WINDOW_POPUP); - gtk_window_set_position(GTK_WINDOW(MsgDlg), GTK_WIN_POS_CENTER); - gtk_window_set_title(GTK_WINDOW(MsgDlg), "SPU2null Msg"); - gtk_container_set_border_width(GTK_CONTAINER(MsgDlg), 5); - - Box = gtk_vbox_new(5, 0); - gtk_container_add(GTK_CONTAINER(MsgDlg), Box); - gtk_widget_show(Box); - - Txt = gtk_label_new(msg); - - gtk_box_pack_start(GTK_BOX(Box), Txt, FALSE, FALSE, 5); - gtk_widget_show(Txt); - - Box1 = gtk_hbutton_box_new(); - gtk_box_pack_start(GTK_BOX(Box), Box1, FALSE, FALSE, 0); - gtk_widget_show(Box1); - - Ok = gtk_button_new_with_label("Ok"); - gtk_signal_connect(GTK_OBJECT(Ok), "clicked", GTK_SIGNAL_FUNC(OnMsg_Ok), NULL); - gtk_container_add(GTK_CONTAINER(Box1), Ok); - GTK_WIDGET_SET_FLAGS(Ok, GTK_CAN_DEFAULT); - gtk_widget_show(Ok); - - gtk_widget_show(MsgDlg); - - 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() { LoadConfig(); @@ -117,10 +33,7 @@ EXPORT_C_(void) SPU2configure() EXPORT_C_(void) SPU2about() { //SysMessage("%s %d.%d", libraryName, version, build); - - About = create_About(); - gtk_widget_show_all(About); - gtk_main(); + SysMessage("SPU2null: A simple null plugin."); } void LoadConfig() diff --git a/plugins/SPU2null/Linux/SPU2null.cbp b/plugins/SPU2null/Linux/SPU2null.cbp index e52313aa8..3896a5205 100644 --- a/plugins/SPU2null/Linux/SPU2null.cbp +++ b/plugins/SPU2null/Linux/SPU2null.cbp @@ -52,16 +52,6 @@ - - - - - - - - diff --git a/plugins/SPU2null/Linux/callbacks.c b/plugins/SPU2null/Linux/callbacks.c deleted file mode 100644 index e87ed8be2..000000000 --- a/plugins/SPU2null/Linux/callbacks.c +++ /dev/null @@ -1,34 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include -#endif - -#include - -#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) -{ - -} - diff --git a/plugins/SPU2null/Linux/callbacks.h b/plugins/SPU2null/Linux/callbacks.h deleted file mode 100644 index e606c242f..000000000 --- a/plugins/SPU2null/Linux/callbacks.h +++ /dev/null @@ -1,14 +0,0 @@ -#include - - -void -OnConf_Ok (GtkButton *button, - gpointer user_data); - -void -OnConf_Cancel (GtkButton *button, - gpointer user_data); - -void -OnAbout_Ok (GtkButton *button, - gpointer user_data); diff --git a/plugins/SPU2null/Linux/interface.c b/plugins/SPU2null/Linux/interface.c deleted file mode 100644 index 1efa3adbb..000000000 --- a/plugins/SPU2null/Linux/interface.c +++ /dev/null @@ -1,173 +0,0 @@ -/* - * DO NOT EDIT THIS FILE - it is generated by Glade. - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include - -#include -#include - -#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 (_("Logging")); - 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; -} - diff --git a/plugins/SPU2null/Linux/interface.h b/plugins/SPU2null/Linux/interface.h deleted file mode 100644 index 69c303ba3..000000000 --- a/plugins/SPU2null/Linux/interface.h +++ /dev/null @@ -1,6 +0,0 @@ -/* - * DO NOT EDIT THIS FILE - it is generated by Glade. - */ - -GtkWidget* create_Config (void); -GtkWidget* create_About (void); diff --git a/plugins/SPU2null/Linux/spu2.glade b/plugins/SPU2null/Linux/spu2.glade deleted file mode 100644 index 75ce9f6b7..000000000 --- a/plugins/SPU2null/Linux/spu2.glade +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - 5 - True - SPU2config - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - 5 - True - False - 5 - - - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 0 - 12 - 0 - - - - True - True - Enable Logging - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - - - - - True - <b>Logging</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - True - True - - - - - - True - GTK_BUTTONBOX_DEFAULT_STYLE - 30 - - - - True - True - True - Ok - True - GTK_RELIEF_NORMAL - True - - - - - - - True - True - True - Cancel - True - GTK_RELIEF_NORMAL - True - - - - - - 0 - True - True - - - - - - - - 5 - True - SPU2about - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - 5 - True - False - 5 - - - - True - SPU2 Null Driver - False - False - GTK_JUSTIFY_CENTER - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - Original Author: ? (zerofrog? linuz?) -Revised by arcum42@gmail.com - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - GTK_BUTTONBOX_DEFAULT_STYLE - 30 - - - - True - True - True - Ok - True - GTK_RELIEF_NORMAL - True - - - - - - 0 - True - True - - - - - - - diff --git a/plugins/SPU2null/Linux/support.c b/plugins/SPU2null/Linux/support.c deleted file mode 100644 index 00aff2982..000000000 --- a/plugins/SPU2null/Linux/support.c +++ /dev/null @@ -1,144 +0,0 @@ -/* - * DO NOT EDIT THIS FILE - it is generated by Glade. - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include -#include -#include - -#include - -#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); - } -} - diff --git a/plugins/SPU2null/Linux/support.h b/plugins/SPU2null/Linux/support.h deleted file mode 100644 index a32649e53..000000000 --- a/plugins/SPU2null/Linux/support.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * DO NOT EDIT THIS FILE - it is generated by Glade. - */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include - -/* - * Standard gettext macros. - */ -#ifdef ENABLE_NLS -# include -# 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); -