wxgui: Fix Linux.

git-svn-id: http://pcsx2.googlecode.com/svn/branches/wxgui@1478 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-07-08 01:10:59 +00:00
parent 911f922001
commit 38d36b2e7c
7 changed files with 476 additions and 439 deletions

View File

@ -183,6 +183,8 @@ public:
public:
AppConfig() : Files( *this )
, Listbook_ImageSize( 32 )
, Toolbar_ImageSize( 32 )
{
}
@ -195,8 +197,13 @@ public:
// The theme name is used to look up files in the themes folder (relative to the executable).
wxString DeskTheme;
// Enables use of 64x64 toolbar icons; when false 32x32 icons are used instead.
bool Toolbar_UseLargeImages;
// Specifies the size of icons used in Listbooks; specifically the PCSX2 Properties dialog box.
// Realisic values range from 96x96 to 24x24.
int Listbook_ImageSize;
// Specifies the size of each toolbar icon, in pixels (any value >= 2 is valid, but realistically
// values should be between 64 and 16 for usability reasons)
int Toolbar_ImageSize;
// Enables display of toolbar text labels.
bool Toolbar_ShowLabels;

View File

@ -195,29 +195,6 @@
<Unit filename="../Misc.cpp" />
<Unit filename="../Misc.h" />
<Unit filename="../NakedAsm.h" />
<Unit filename="../gui/AboutBoxDialog.cpp" />
<Unit filename="../gui/AboutBoxDialog.h" />
<Unit filename="../gui/AdvancedDialog.cpp" />
<Unit filename="../gui/AdvancedDialog.h" />
<Unit filename="../gui/App.h" />
<Unit filename="../gui/AppConfig.cpp" />
<Unit filename="../gui/CheckedStaticBox.cpp" />
<Unit filename="../gui/CheckedStaticBox.h" />
<Unit filename="../gui/ConsoleLogger.cpp" />
<Unit filename="../gui/GameFixesDialog.cpp" />
<Unit filename="../gui/GameFixesDialog.h" />
<Unit filename="../gui/HostGui.cpp" />
<Unit filename="../gui/IniInterface.cpp" />
<Unit filename="../gui/IniInterface.h" />
<Unit filename="../gui/LogOptionsDialog.cpp" />
<Unit filename="../gui/LogOptionsDialog.h" />
<Unit filename="../gui/MainFrame.cpp" />
<Unit filename="../gui/MainFrame.h" />
<Unit filename="../gui/SpeedHacksDialog.cpp" />
<Unit filename="../gui/SpeedHacksDialog.h" />
<Unit filename="../gui/main.cpp" />
<Unit filename="../gui/wxHelpers.cpp" />
<Unit filename="../gui/wxHelpers.h" />
<Unit filename="../Patch.cpp" />
<Unit filename="../Patch.h" />
<Unit filename="../PathUtils.cpp" />
@ -236,10 +213,6 @@
<Unit filename="../R5900OpcodeTables.cpp" />
<Unit filename="../R5900OpcodeTables.h" />
<Unit filename="../RecoverySystem.cpp" />
<Unit filename="../gui/Resources/AppIcon.h" />
<Unit filename="../gui/Resources/BackgroundLogo.h" />
<Unit filename="../gui/Resources/EmbeddedImage.h" />
<Unit filename="../gui/Resources/ps2_silver.h" />
<Unit filename="../SPR.cpp" />
<Unit filename="../SPR.h" />
<Unit filename="../SafeArray.h" />
@ -278,6 +251,47 @@
<Unit filename="../Vif.h" />
<Unit filename="../VifDma.cpp" />
<Unit filename="../VifDma.h" />
<Unit filename="../gui/AboutBoxDialog.cpp" />
<Unit filename="../gui/AboutBoxDialog.h" />
<Unit filename="../gui/AdvancedDialog.cpp" />
<Unit filename="../gui/AdvancedDialog.h" />
<Unit filename="../gui/App.h" />
<Unit filename="../gui/AppConfig.cpp" />
<Unit filename="../gui/CheckedStaticBox.cpp" />
<Unit filename="../gui/CheckedStaticBox.h" />
<Unit filename="../gui/ConsoleLogger.cpp" />
<Unit filename="../gui/Dialogs/ConfigurationDialog.cpp" />
<Unit filename="../gui/Dialogs/ConfigurationDialog.h" />
<Unit filename="../gui/GameFixesDialog.h" />
<Unit filename="../gui/HostGui.cpp" />
<Unit filename="../gui/IniInterface.cpp" />
<Unit filename="../gui/IniInterface.h" />
<Unit filename="../gui/LogOptionsDialog.cpp" />
<Unit filename="../gui/LogOptionsDialog.h" />
<Unit filename="../gui/MainFrame.cpp" />
<Unit filename="../gui/MainFrame.h" />
<Unit filename="../gui/Panels/AudioPanel.cpp" />
<Unit filename="../gui/Panels/ConfigurationPanels.h" />
<Unit filename="../gui/Panels/CpuPanel.cpp" />
<Unit filename="../gui/Panels/GameFixesPanel.cpp" />
<Unit filename="../gui/Panels/PathsPanel.cpp" />
<Unit filename="../gui/Panels/PluginSelectorPanel.cpp" />
<Unit filename="../gui/Panels/SpeedhacksPanel.cpp" />
<Unit filename="../gui/Panels/VideoPanel.cpp" />
<Unit filename="../gui/Resources/AppIcon.h" />
<Unit filename="../gui/Resources/BackgroundLogo.h" />
<Unit filename="../gui/Resources/ConfigIcon_Cpu.h" />
<Unit filename="../gui/Resources/ConfigIcon_Gamefixes.h" />
<Unit filename="../gui/Resources/ConfigIcon_Paths.h" />
<Unit filename="../gui/Resources/ConfigIcon_Plugins.h" />
<Unit filename="../gui/Resources/ConfigIcon_Speedhacks.h" />
<Unit filename="../gui/Resources/ConfigIcon_Video.h" />
<Unit filename="../gui/Resources/EmbeddedImage.h" />
<Unit filename="../gui/Resources/ps2_silver.h" />
<Unit filename="../gui/SpeedHacksDialog.h" />
<Unit filename="../gui/main.cpp" />
<Unit filename="../gui/wxHelpers.cpp" />
<Unit filename="../gui/wxHelpers.h" />
<Unit filename="../pcsxAbout.bmp" />
<Unit filename="../ps2/Iop/IopHwRead.cpp" />
<Unit filename="../ps2/Iop/IopHwWrite.cpp" />

View File

@ -20,7 +20,7 @@
#include <wx/wx.h>
#include <wx/fileconf.h>
#include <wx/imaglist.h>
#include "System.h"
class MainEmuFrame;

View File

@ -166,7 +166,10 @@ wxString AppConfig::FullpathHelpers::Bios() const { return Path::Combine( m_conf
wxString AppConfig::FullpathHelpers::Mcd( uint mcdidx ) const { return Path::Combine( m_conf.Folders.MemoryCards, m_conf.MemoryCards.Mcd[mcdidx].Filename ); }
// ------------------------------------------------------------------------
#define IniEntry( varname, defval ) ini.Entry( L#varname, varname, defval )
// GCC Note: wxT() macro is required when using string token pasting. For some reason L generates
// syntax errors. >_<
//
#define IniEntry( varname, defval ) ini.Entry( wxT(#varname), varname, defval )
void AppConfig::LoadSave( IniInterface& ini )
{

View File

@ -34,8 +34,14 @@ using namespace Panels;
Dialogs::ConfigurationDialog::ConfigurationDialog( wxWindow* parent, int id ) :
wxDialogWithHelpers( parent, id, _T("PCSX2 Configuration"), true )
{
#if defined(__WXMAC__) || defined(__WXMSW__)
int orient = wxBK_TOP;
#else
int orient = wxBK_LEFT;
#endif
wxBoxSizer& mainSizer = *new wxBoxSizer( wxVERTICAL );
wxListbook& Notebook = *new wxListbook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLB_TOP );
wxListbook& Notebook = *new wxListbook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, orient );
Notebook.SetImageList( &wxGetApp().GetImgList_Config() );

View File

@ -20,7 +20,6 @@
#include <wx/wx.h>
#include <wx/image.h>
#include <wx/imaglist.h>
#include <wx/propdlg.h>
#include "wxHelpers.h"

View File

@ -218,7 +218,8 @@ const wxBitmap& Pcsx2App::GetLogoBitmap()
}
wxImage img;
LoadImageAny( img, useTheme, mess, L"BackgroundLogo", EmbeddedImage<png_BackgroundLogo>() );
EmbeddedImage<png_BackgroundLogo> temp; // because gcc can't allow non-const temporaries.
LoadImageAny( img, useTheme, mess, L"BackgroundLogo", temp );
m_Bitmap_Logo = new wxBitmap( img );
return *m_Bitmap_Logo;
@ -245,15 +246,18 @@ wxImageList& Pcsx2App::GetImgList_Config()
}
wxImage img;
int width, height;
m_ConfigImages.GetSize( 0, width, height );
// GCC Specific: wxT() macro is required when using string token pasting. For some reason L
// generates syntax errors. >_<
#undef FancyLoadMacro
#define FancyLoadMacro( name ) \
{ \
EmbeddedImage<png_ConfigIcon_##name> temp( g_Conf.Listbook_ImageSize, g_Conf.Listbook_ImageSize ); \
m_ImageId.Config.name = m_ConfigImages.Add( LoadImageAny( \
img, useTheme, mess, L"ConfigIcon_" L#name, EmbeddedImage<png_ConfigIcon_##name>( width, height ) ) \
);
img, useTheme, mess, L"ConfigIcon_" wxT(#name), temp ) \
); \
}
FancyLoadMacro( Paths );
FancyLoadMacro( Gamefixes );
@ -269,7 +273,7 @@ wxImageList& Pcsx2App::GetImgList_Toolbars()
{
if( m_ToolbarImages == NULL )
{
const int imgSize = g_Conf.Toolbar_UseLargeImages ? 64 : 32;
const int imgSize = g_Conf.Toolbar_ImageSize ? 64 : 32;
m_ToolbarImages = new wxImageList( imgSize, imgSize );
wxFileName mess;
bool useTheme = (g_Conf.DeskTheme != L"default");
@ -283,7 +287,11 @@ wxImageList& Pcsx2App::GetImgList_Toolbars()
wxImage img;
#undef FancyLoadMacro
#define FancyLoadMacro( name ) \
m_ImageId.Toolbars.name = m_ConfigImages.Add( LoadImageAny64( img, useTheme, g_Conf.Toolbar_UseLargeImages, mess, L"ToolbarIcon64" L#name, EmbeddedImage<png_ToolbarIcon64_##name>() ) );
{ \
EmbeddedImage<png_ToolbarIcon_##name> temp( imgSize, imgSize ); \
m_ImageId.Toolbars.name = m_ConfigImages.Add( LoadImageAny( img, useTheme, mess, L"ToolbarIcon" wxT(#name), temp ) ); \
}
}
return *m_ToolbarImages;
}