Remove anything saying Playground from the Linux version. Minor change to the Linux cpu code.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@435 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
arcum42 2009-02-06 22:46:05 +00:00
parent 3fa8c34a8d
commit b16a122e9f
10 changed files with 12673 additions and 12668 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 KiB

After

Width:  |  Height:  |  Size: 245 KiB

View File

@ -74,6 +74,6 @@ extern TESTRUNARGS g_TestRun;
//#include "Misc.h" //#include "Misc.h"
#include "Patch.h" #include "Patch.h"
#define PCSX2_VERSION "Playground (beta)" #define PCSX2_VERSION "(beta)"
#endif /* __COMMON_H__ */ #endif /* __COMMON_H__ */

View File

@ -18,7 +18,6 @@
#include "DebugDlg.h" #include "DebugDlg.h"
using namespace R5900; using namespace R5900;
//using namespace Dynarec;
void UpdateDebugger() { void UpdateDebugger() {

View File

@ -36,9 +36,9 @@ void StartGui() {
MainWindow = create_MainWindow(); MainWindow = create_MainWindow();
if (SVN_REV != 0) if (SVN_REV != 0)
gtk_window_set_title(GTK_WINDOW(MainWindow), "PCSX2 "PCSX2_VERSION" "SVN_REV" Playground"); gtk_window_set_title(GTK_WINDOW(MainWindow), "PCSX2 "PCSX2_VERSION" "SVN_REV);
else else
gtk_window_set_title(GTK_WINDOW(MainWindow), "PCSX2 "PCSX2_VERSION" Playground"); gtk_window_set_title(GTK_WINDOW(MainWindow), "PCSX2 "PCSX2_VERSION);
// status bar // status bar
pStatusBar = gtk_statusbar_new (); pStatusBar = gtk_statusbar_new ();
@ -605,11 +605,17 @@ void OnCpu_Ok(GtkButton *button, gpointer user_data) {
{ {
SysRestorableReset(); SysRestorableReset();
if( (Config.Options&PCSX2_GSMULTITHREAD) ^ (newopts&PCSX2_GSMULTITHREAD) ) if ((Config.Options&PCSX2_GSMULTITHREAD) ^ (newopts&PCSX2_GSMULTITHREAD))
{ {
// gotta shut down *all* the plugins. // Need the MTGS setting to take effect, so close out the plugins:
ResetPlugins(); PluginsResetGS();
if (CHECK_MULTIGS)
Console::Notice( "MTGS mode disabled.\n\tEnjoy the fruits of single-threaded simpicity." );
else
Console::Notice( "MTGS mode enabled.\n\tWelcome to multi-threaded awesomeness. And random crashes." );
} }
Config.Options = newopts; Config.Options = newopts;
} }
else else
@ -731,10 +737,10 @@ void OnHelp_About(GtkMenuItem *menuitem, gpointer user_data) {
// Include the SVN revision // Include the SVN revision
if (SVN_REV !=0) if (SVN_REV !=0)
sprintf(str, _("PCSX2 Playground For Linux\nVersion %s %s\n"), PCSX2_VERSION, SVN_REV); sprintf(str, _("PCSX2 For Linux\nVersion %s %s\n"), PCSX2_VERSION, SVN_REV);
else else
//Use this instead for a non-svn version //Use this instead for a non-svn version
sprintf(str, _("PCSX2 Playground For Linux\nVersion %s\n"), PCSX2_VERSION); sprintf(str, _("PCSX2 For Linux\nVersion %s\n"), PCSX2_VERSION);
gtk_label_set_text(GTK_LABEL(Label), str); gtk_label_set_text(GTK_LABEL(Label), str);

View File

@ -1,387 +1,387 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
void void
on_Advanced_Defaults (GtkButton *button, on_Advanced_Defaults (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
on_Advanced_OK (GtkButton *button, on_Advanced_OK (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
On_Dialog_Cancelled (GtkButton *button, On_Dialog_Cancelled (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
on_Speed_Hack_OK (GtkButton *button, on_Speed_Hack_OK (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
on_Game_Fix_OK (GtkButton *button, on_Game_Fix_OK (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnMemWrite32_Ok (GtkButton *button, OnMemWrite32_Ok (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnArguments_Ok (GtkButton *button, OnArguments_Ok (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnDumpR_Ok (GtkButton *button, OnDumpR_Ok (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnDumpC_Ok (GtkButton *button, OnDumpC_Ok (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnSetBPC_Ok (GtkButton *button, OnSetBPC_Ok (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnSetBPA_Ok (GtkButton *button, OnSetBPA_Ok (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnSetBPA_Cancel (GtkButton *button, OnSetBPA_Cancel (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnSetPC_Ok (GtkButton *button, OnSetPC_Ok (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnDebug_EEMode (GtkToggleButton *togglebutton, OnDebug_EEMode (GtkToggleButton *togglebutton,
gpointer user_data); gpointer user_data);
void void
OnDebug_IOPMode (GtkToggleButton *togglebutton, OnDebug_IOPMode (GtkToggleButton *togglebutton,
gpointer user_data); gpointer user_data);
void void
OnDebug_Step (GtkButton *button, OnDebug_Step (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnDebug_Skip (GtkButton *button, OnDebug_Skip (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnDebug_Go (GtkButton *button, OnDebug_Go (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnDebug_Log (GtkButton *button, OnDebug_Log (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnDebug_SetPC (GtkButton *button, OnDebug_SetPC (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnDebug_SetBPA (GtkButton *button, OnDebug_SetBPA (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnDebug_SetBPC (GtkButton *button, OnDebug_SetBPC (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnDebug_ClearBPs (GtkButton *button, OnDebug_ClearBPs (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnDebug_DumpCode (GtkButton *button, OnDebug_DumpCode (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnDebug_RawDump (GtkButton *button, OnDebug_RawDump (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnDebug_Close (GtkButton *button, OnDebug_Close (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnDebug_memWrite32 (GtkButton *button, OnDebug_memWrite32 (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_FWConf (GtkButton *button, OnConfConf_FWConf (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_FWTest (GtkButton *button, OnConfConf_FWTest (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_FWAbout (GtkButton *button, OnConfConf_FWAbout (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_UsbConf (GtkButton *button, OnConfConf_UsbConf (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_UsbTest (GtkButton *button, OnConfConf_UsbTest (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_UsbAbout (GtkButton *button, OnConfConf_UsbAbout (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_CdvdConf (GtkButton *button, OnConfConf_CdvdConf (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_CdvdTest (GtkButton *button, OnConfConf_CdvdTest (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_CdvdAbout (GtkButton *button, OnConfConf_CdvdAbout (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_Dev9Conf (GtkButton *button, OnConfConf_Dev9Conf (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_Dev9Test (GtkButton *button, OnConfConf_Dev9Test (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_Dev9About (GtkButton *button, OnConfConf_Dev9About (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_Spu2Conf (GtkButton *button, OnConfConf_Spu2Conf (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_Spu2Test (GtkButton *button, OnConfConf_Spu2Test (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_Spu2About (GtkButton *button, OnConfConf_Spu2About (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_GsConf (GtkButton *button, OnConfConf_GsConf (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_GsTest (GtkButton *button, OnConfConf_GsTest (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_GsAbout (GtkButton *button, OnConfConf_GsAbout (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_Pad1Conf (GtkButton *button, OnConfConf_Pad1Conf (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_Pad1Test (GtkButton *button, OnConfConf_Pad1Test (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_Pad1About (GtkButton *button, OnConfConf_Pad1About (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_Pad2Conf (GtkButton *button, OnConfConf_Pad2Conf (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_Pad2Test (GtkButton *button, OnConfConf_Pad2Test (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_Pad2About (GtkButton *button, OnConfConf_Pad2About (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_PluginsPath (GtkButton *button, OnConfConf_PluginsPath (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_BiosPath (GtkButton *button, OnConfConf_BiosPath (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnConfConf_Ok (GtkButton *button, OnConfConf_Ok (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnHelpAbout_Ok (GtkButton *button, OnHelpAbout_Ok (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnDestroy (GtkObject *object, OnDestroy (GtkObject *object,
gpointer user_data); gpointer user_data);
gboolean gboolean
OnDelete (GtkWidget *widget, OnDelete (GtkWidget *widget,
GdkEvent *event, GdkEvent *event,
gpointer user_data); gpointer user_data);
void void
OnFile_RunCD (GtkMenuItem *menuitem, OnFile_RunCD (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnFile_LoadElf (GtkMenuItem *menuitem, OnFile_LoadElf (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnStates_Load1 (GtkMenuItem *menuitem, OnStates_Load1 (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnStates_Load2 (GtkMenuItem *menuitem, OnStates_Load2 (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnStates_Load3 (GtkMenuItem *menuitem, OnStates_Load3 (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnStates_Load4 (GtkMenuItem *menuitem, OnStates_Load4 (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnStates_Load5 (GtkMenuItem *menuitem, OnStates_Load5 (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnStates_LoadOther (GtkMenuItem *menuitem, OnStates_LoadOther (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnStates_Save1 (GtkMenuItem *menuitem, OnStates_Save1 (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnStates_Save2 (GtkMenuItem *menuitem, OnStates_Save2 (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnStates_Save3 (GtkMenuItem *menuitem, OnStates_Save3 (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnStates_Save4 (GtkMenuItem *menuitem, OnStates_Save4 (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnStates_Save5 (GtkMenuItem *menuitem, OnStates_Save5 (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnStates_SaveOther (GtkMenuItem *menuitem, OnStates_SaveOther (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnFile_Exit (GtkMenuItem *menuitem, OnFile_Exit (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnEmu_Run (GtkMenuItem *menuitem, OnEmu_Run (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnEmu_Reset (GtkMenuItem *menuitem, OnEmu_Reset (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnEmu_Arguments (GtkMenuItem *menuitem, OnEmu_Arguments (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnConf_Conf (GtkMenuItem *menuitem, OnConf_Conf (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnConf_Gs (GtkMenuItem *menuitem, OnConf_Gs (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnConf_Pads (GtkMenuItem *menuitem, OnConf_Pads (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnConf_Spu2 (GtkMenuItem *menuitem, OnConf_Spu2 (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnConf_Cdvd (GtkMenuItem *menuitem, OnConf_Cdvd (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnConf_Dev9 (GtkMenuItem *menuitem, OnConf_Dev9 (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnConf_Usb (GtkMenuItem *menuitem, OnConf_Usb (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnConf_Fw (GtkMenuItem *menuitem, OnConf_Fw (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnConf_Cpu (GtkMenuItem *menuitem, OnConf_Cpu (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
on_Game_Fixes (GtkMenuItem *menuitem, on_Game_Fixes (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
on_Speed_Hacks (GtkMenuItem *menuitem, on_Speed_Hacks (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
on_Advanced (GtkMenuItem *menuitem, on_Advanced (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
on_patch_browser1_activate (GtkMenuItem *menuitem, on_patch_browser1_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
on_patch_finder2_activate (GtkMenuItem *menuitem, on_patch_finder2_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
on_enable_console1_activate (GtkMenuItem *menuitem, on_enable_console1_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
on_enable_patches1_activate (GtkMenuItem *menuitem, on_enable_patches1_activate (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnDebug_Debugger (GtkMenuItem *menuitem, OnDebug_Debugger (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnDebug_Logging (GtkMenuItem *menuitem, OnDebug_Logging (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnHelp_About (GtkMenuItem *menuitem, OnHelp_About (GtkMenuItem *menuitem,
gpointer user_data); gpointer user_data);
void void
OnCpu_Ok (GtkButton *button, OnCpu_Ok (GtkButton *button,
gpointer user_data); gpointer user_data);
void void
OnLogging_Ok (GtkButton *button, OnLogging_Ok (GtkButton *button,
gpointer user_data); gpointer user_data);

File diff suppressed because it is too large Load Diff

View File

@ -1,22 +1,22 @@
/* /*
* DO NOT EDIT THIS FILE - it is generated by Glade. * DO NOT EDIT THIS FILE - it is generated by Glade.
*/ */
GtkWidget* create_AdvDlg (void); GtkWidget* create_AdvDlg (void);
GtkWidget* create_SpeedHacksDlg (void); GtkWidget* create_SpeedHacksDlg (void);
GtkWidget* create_GameFixDlg (void); GtkWidget* create_GameFixDlg (void);
GtkWidget* create_MemWrite32 (void); GtkWidget* create_MemWrite32 (void);
GtkWidget* create_CmdLine (void); GtkWidget* create_CmdLine (void);
GtkWidget* create_DumpRDlg (void); GtkWidget* create_DumpRDlg (void);
GtkWidget* create_DumpCDlg (void); GtkWidget* create_DumpCDlg (void);
GtkWidget* create_SetBPCDlg (void); GtkWidget* create_SetBPCDlg (void);
GtkWidget* create_SetBPADlg (void); GtkWidget* create_SetBPADlg (void);
GtkWidget* create_SetPCDlg (void); GtkWidget* create_SetPCDlg (void);
GtkWidget* create_DebugWnd (void); GtkWidget* create_DebugWnd (void);
GtkWidget* create_ConfDlg (void); GtkWidget* create_ConfDlg (void);
GtkWidget* create_AboutDlg (void); GtkWidget* create_AboutDlg (void);
GtkWidget* create_MainWindow (void); GtkWidget* create_MainWindow (void);
GtkWidget* create_PatchBrowserWindow (void); GtkWidget* create_PatchBrowserWindow (void);
GtkWidget* create_PatchFinderWindow (void); GtkWidget* create_PatchFinderWindow (void);
GtkWidget* create_CpuDlg (void); GtkWidget* create_CpuDlg (void);
GtkWidget* create_Logging (void); GtkWidget* create_Logging (void);

File diff suppressed because it is too large Load Diff

View File

@ -1,144 +1,144 @@
/* /*
* DO NOT EDIT THIS FILE - it is generated by Glade. * DO NOT EDIT THIS FILE - it is generated by Glade.
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "support.h" #include "support.h"
GtkWidget* GtkWidget*
lookup_widget (GtkWidget *widget, lookup_widget (GtkWidget *widget,
const gchar *widget_name) const gchar *widget_name)
{ {
GtkWidget *parent, *found_widget; GtkWidget *parent, *found_widget;
for (;;) for (;;)
{ {
if (GTK_IS_MENU (widget)) if (GTK_IS_MENU (widget))
parent = gtk_menu_get_attach_widget (GTK_MENU (widget)); parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
else else
parent = widget->parent; parent = widget->parent;
if (!parent) if (!parent)
parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey"); parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey");
if (parent == NULL) if (parent == NULL)
break; break;
widget = parent; widget = parent;
} }
found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget), found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
widget_name); widget_name);
if (!found_widget) if (!found_widget)
g_warning ("Widget not found: %s", widget_name); g_warning ("Widget not found: %s", widget_name);
return found_widget; return found_widget;
} }
static GList *pixmaps_directories = NULL; static GList *pixmaps_directories = NULL;
/* Use this function to set the directory containing installed pixmaps. */ /* Use this function to set the directory containing installed pixmaps. */
void void
add_pixmap_directory (const gchar *directory) add_pixmap_directory (const gchar *directory)
{ {
pixmaps_directories = g_list_prepend (pixmaps_directories, pixmaps_directories = g_list_prepend (pixmaps_directories,
g_strdup (directory)); g_strdup (directory));
} }
/* This is an internally used function to find pixmap files. */ /* This is an internally used function to find pixmap files. */
static gchar* static gchar*
find_pixmap_file (const gchar *filename) find_pixmap_file (const gchar *filename)
{ {
GList *elem; GList *elem;
/* We step through each of the pixmaps directory to find it. */ /* We step through each of the pixmaps directory to find it. */
elem = pixmaps_directories; elem = pixmaps_directories;
while (elem) while (elem)
{ {
gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data, gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
G_DIR_SEPARATOR_S, filename); G_DIR_SEPARATOR_S, filename);
if (g_file_test (pathname, G_FILE_TEST_EXISTS)) if (g_file_test (pathname, G_FILE_TEST_EXISTS))
return pathname; return pathname;
g_free (pathname); g_free (pathname);
elem = elem->next; elem = elem->next;
} }
return NULL; return NULL;
} }
/* This is an internally used function to create pixmaps. */ /* This is an internally used function to create pixmaps. */
GtkWidget* GtkWidget*
create_pixmap (GtkWidget *widget, create_pixmap (GtkWidget *widget,
const gchar *filename) const gchar *filename)
{ {
gchar *pathname = NULL; gchar *pathname = NULL;
GtkWidget *pixmap; GtkWidget *pixmap;
if (!filename || !filename[0]) if (!filename || !filename[0])
return gtk_image_new (); return gtk_image_new ();
pathname = find_pixmap_file (filename); pathname = find_pixmap_file (filename);
if (!pathname) if (!pathname)
{ {
g_warning (_("Couldn't find pixmap file: %s"), filename); g_warning (_("Couldn't find pixmap file: %s"), filename);
return gtk_image_new (); return gtk_image_new ();
} }
pixmap = gtk_image_new_from_file (pathname); pixmap = gtk_image_new_from_file (pathname);
g_free (pathname); g_free (pathname);
return pixmap; return pixmap;
} }
/* This is an internally used function to create pixmaps. */ /* This is an internally used function to create pixmaps. */
GdkPixbuf* GdkPixbuf*
create_pixbuf (const gchar *filename) create_pixbuf (const gchar *filename)
{ {
gchar *pathname = NULL; gchar *pathname = NULL;
GdkPixbuf *pixbuf; GdkPixbuf *pixbuf;
GError *error = NULL; GError *error = NULL;
if (!filename || !filename[0]) if (!filename || !filename[0])
return NULL; return NULL;
pathname = find_pixmap_file (filename); pathname = find_pixmap_file (filename);
if (!pathname) if (!pathname)
{ {
g_warning (_("Couldn't find pixmap file: %s"), filename); g_warning (_("Couldn't find pixmap file: %s"), filename);
return NULL; return NULL;
} }
pixbuf = gdk_pixbuf_new_from_file (pathname, &error); pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
if (!pixbuf) if (!pixbuf)
{ {
fprintf (stderr, "Failed to load pixbuf file: %s: %s\n", fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
pathname, error->message); pathname, error->message);
g_error_free (error); g_error_free (error);
} }
g_free (pathname); g_free (pathname);
return pixbuf; return pixbuf;
} }
/* This is used to set ATK action descriptions. */ /* This is used to set ATK action descriptions. */
void void
glade_set_atk_action_description (AtkAction *action, glade_set_atk_action_description (AtkAction *action,
const gchar *action_name, const gchar *action_name,
const gchar *description) const gchar *description)
{ {
gint n_actions, i; gint n_actions, i;
n_actions = atk_action_get_n_actions (action); n_actions = atk_action_get_n_actions (action);
for (i = 0; i < n_actions; i++) for (i = 0; i < n_actions; i++)
{ {
if (!strcmp (atk_action_get_name (action, i), action_name)) if (!strcmp (atk_action_get_name (action, i), action_name))
atk_action_set_description (action, i, description); atk_action_set_description (action, i, description);
} }
} }

View File

@ -1,69 +1,69 @@
/* /*
* DO NOT EDIT THIS FILE - it is generated by Glade. * DO NOT EDIT THIS FILE - it is generated by Glade.
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include <config.h> # include <config.h>
#endif #endif
#include <gtk/gtk.h> #include <gtk/gtk.h>
/* /*
* Standard gettext macros. * Standard gettext macros.
*/ */
#ifdef ENABLE_NLS #ifdef ENABLE_NLS
# include <libintl.h> # include <libintl.h>
# undef _ # undef _
# define _(String) dgettext (PACKAGE, String) # define _(String) dgettext (PACKAGE, String)
# define Q_(String) g_strip_context ((String), gettext (String)) # define Q_(String) g_strip_context ((String), gettext (String))
# ifdef gettext_noop # ifdef gettext_noop
# define N_(String) gettext_noop (String) # define N_(String) gettext_noop (String)
# else # else
# define N_(String) (String) # define N_(String) (String)
# endif # endif
#else #else
# define textdomain(String) (String) # define textdomain(String) (String)
# define gettext(String) (String) # define gettext(String) (String)
# define dgettext(Domain,Message) (Message) # define dgettext(Domain,Message) (Message)
# define dcgettext(Domain,Message,Type) (Message) # define dcgettext(Domain,Message,Type) (Message)
# define bindtextdomain(Domain,Directory) (Domain) # define bindtextdomain(Domain,Directory) (Domain)
# define _(String) (String) # define _(String) (String)
# define Q_(String) g_strip_context ((String), (String)) # define Q_(String) g_strip_context ((String), (String))
# define N_(String) (String) # define N_(String) (String)
#endif #endif
/* /*
* Public Functions. * Public Functions.
*/ */
/* /*
* This function returns a widget in a component created by Glade. * 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), * 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 * or alternatively any widget in the component, and the name of the widget
* you want returned. * you want returned.
*/ */
GtkWidget* lookup_widget (GtkWidget *widget, GtkWidget* lookup_widget (GtkWidget *widget,
const gchar *widget_name); const gchar *widget_name);
/* Use this function to set the directory containing installed pixmaps. */ /* Use this function to set the directory containing installed pixmaps. */
void add_pixmap_directory (const gchar *directory); void add_pixmap_directory (const gchar *directory);
/* /*
* Private Functions. * Private Functions.
*/ */
/* This is used to create the pixmaps used in the interface. */ /* This is used to create the pixmaps used in the interface. */
GtkWidget* create_pixmap (GtkWidget *widget, GtkWidget* create_pixmap (GtkWidget *widget,
const gchar *filename); const gchar *filename);
/* This is used to create the pixbufs used in the interface. */ /* This is used to create the pixbufs used in the interface. */
GdkPixbuf* create_pixbuf (const gchar *filename); GdkPixbuf* create_pixbuf (const gchar *filename);
/* This is used to set ATK action descriptions. */ /* This is used to set ATK action descriptions. */
void glade_set_atk_action_description (AtkAction *action, void glade_set_atk_action_description (AtkAction *action,
const gchar *action_name, const gchar *action_name,
const gchar *description); const gchar *description);