129 changes: 18 additions & 111 deletions Source/Core/DolphinWX/Src/FrameTools.cpp
Expand Up @@ -78,23 +78,6 @@ Core::GetWindowHandle().
// Resources
extern "C" {
#include "../resources/Dolphin.c" // Dolphin icon
#include "../resources/toolbar_browse.c"
#include "../resources/toolbar_file_open.c"
#include "../resources/toolbar_fullscreen.c"
#include "../resources/toolbar_help.c"
#include "../resources/toolbar_pause.c"
#include "../resources/toolbar_play.c"
#include "../resources/toolbar_plugin_dsp.c"
#include "../resources/toolbar_plugin_gfx.c"
#include "../resources/toolbar_plugin_options.c"
#include "../resources/toolbar_plugin_pad.c"
#include "../resources/toolbar_plugin_wiimote.c"
#include "../resources/toolbar_refresh.c"
#include "../resources/toolbar_stop.c"
#include "../resources/Boomy.h" // Theme packages
#include "../resources/Vista.h"
#include "../resources/X-Plastik.h"
#include "../resources/KDE.h"
};

bool confirmStop = false;
Expand Down Expand Up @@ -512,102 +495,26 @@ void CFrame::RecreateToolbar()

void CFrame::InitBitmaps()
{
// Get selected theme
int Theme = SConfig::GetInstance().m_LocalCoreStartupParameter.iTheme;

// Save memory by only having one set of bitmaps loaded at any time. I mean, they are still
// in the exe, which is in memory, but at least we wont make another copy of all of them.
switch (Theme)
{
case BOOMY:
{
// These are stored as 48x48
m_Bitmaps[Toolbar_FileOpen] = wxGetBitmapFromMemory(toolbar_file_open_png);
m_Bitmaps[Toolbar_Refresh] = wxGetBitmapFromMemory(toolbar_refresh_png);
m_Bitmaps[Toolbar_Browse] = wxGetBitmapFromMemory(toolbar_browse_png);
m_Bitmaps[Toolbar_Play] = wxGetBitmapFromMemory(toolbar_play_png);
m_Bitmaps[Toolbar_Stop] = wxGetBitmapFromMemory(toolbar_stop_png);
m_Bitmaps[Toolbar_Pause] = wxGetBitmapFromMemory(toolbar_pause_png);
m_Bitmaps[Toolbar_ConfigMain] = wxGetBitmapFromMemory(toolbar_plugin_options_png);
m_Bitmaps[Toolbar_ConfigGFX] = wxGetBitmapFromMemory(toolbar_plugin_gfx_png);
m_Bitmaps[Toolbar_ConfigDSP] = wxGetBitmapFromMemory(toolbar_plugin_dsp_png);
m_Bitmaps[Toolbar_ConfigPAD] = wxGetBitmapFromMemory(toolbar_plugin_pad_png);
m_Bitmaps[Toolbar_Wiimote] = wxGetBitmapFromMemory(toolbar_plugin_wiimote_png);
m_Bitmaps[Toolbar_Screenshot] = wxGetBitmapFromMemory(toolbar_fullscreen_png);
m_Bitmaps[Toolbar_FullScreen] = wxGetBitmapFromMemory(toolbar_fullscreen_png);
m_Bitmaps[Toolbar_Help] = wxGetBitmapFromMemory(toolbar_help_png);

// Scale the 48x48 bitmaps to 24x24
for (size_t n = Toolbar_FileOpen; n < EToolbar_Max; n++)
{
m_Bitmaps[n] = wxBitmap(m_Bitmaps[n].ConvertToImage().Scale(24, 24));
}
}
break;

case VISTA:
{
// These are stored as 24x24 and need no scaling
m_Bitmaps[Toolbar_FileOpen] = wxGetBitmapFromMemory(Toolbar_Open1_png);
m_Bitmaps[Toolbar_Refresh] = wxGetBitmapFromMemory(Toolbar_Refresh1_png);
m_Bitmaps[Toolbar_Browse] = wxGetBitmapFromMemory(Toolbar_Browse1_png);
m_Bitmaps[Toolbar_Play] = wxGetBitmapFromMemory(Toolbar_Play1_png);
m_Bitmaps[Toolbar_Stop] = wxGetBitmapFromMemory(Toolbar_Stop1_png);
m_Bitmaps[Toolbar_Pause] = wxGetBitmapFromMemory(Toolbar_Pause1_png);
m_Bitmaps[Toolbar_ConfigMain] = wxGetBitmapFromMemory(Toolbar_Options1_png);
m_Bitmaps[Toolbar_ConfigGFX] = wxGetBitmapFromMemory(Toolbar_Gfx1_png);
m_Bitmaps[Toolbar_ConfigDSP] = wxGetBitmapFromMemory(Toolbar_DSP1_png);
m_Bitmaps[Toolbar_ConfigPAD] = wxGetBitmapFromMemory(Toolbar_Pad1_png);
m_Bitmaps[Toolbar_Wiimote] = wxGetBitmapFromMemory(Toolbar_Wiimote1_png);
m_Bitmaps[Toolbar_Screenshot] = wxGetBitmapFromMemory(Toolbar_Fullscreen1_png);
m_Bitmaps[Toolbar_FullScreen] = wxGetBitmapFromMemory(Toolbar_Fullscreen1_png);
m_Bitmaps[Toolbar_Help] = wxGetBitmapFromMemory(Toolbar_Help1_png);
}
break;

case XPLASTIK:
{
m_Bitmaps[Toolbar_FileOpen] = wxGetBitmapFromMemory(Toolbar_Open2_png);
m_Bitmaps[Toolbar_Refresh] = wxGetBitmapFromMemory(Toolbar_Refresh2_png);
m_Bitmaps[Toolbar_Browse] = wxGetBitmapFromMemory(Toolbar_Browse2_png);
m_Bitmaps[Toolbar_Play] = wxGetBitmapFromMemory(Toolbar_Play2_png);
m_Bitmaps[Toolbar_Stop] = wxGetBitmapFromMemory(Toolbar_Stop2_png);
m_Bitmaps[Toolbar_Pause] = wxGetBitmapFromMemory(Toolbar_Pause2_png);
m_Bitmaps[Toolbar_ConfigMain] = wxGetBitmapFromMemory(Toolbar_Options2_png);
m_Bitmaps[Toolbar_ConfigGFX] = wxGetBitmapFromMemory(Toolbar_Gfx2_png);
m_Bitmaps[Toolbar_ConfigDSP] = wxGetBitmapFromMemory(Toolbar_DSP2_png);
m_Bitmaps[Toolbar_ConfigPAD] = wxGetBitmapFromMemory(Toolbar_Pad2_png);
m_Bitmaps[Toolbar_Wiimote] = wxGetBitmapFromMemory(Toolbar_Wiimote2_png);
m_Bitmaps[Toolbar_Screenshot] = wxGetBitmapFromMemory(Toolbar_Fullscreen2_png);
m_Bitmaps[Toolbar_FullScreen] = wxGetBitmapFromMemory(Toolbar_Fullscreen2_png);
m_Bitmaps[Toolbar_Help] = wxGetBitmapFromMemory(Toolbar_Help2_png);
}
break;

case KDE:
{
m_Bitmaps[Toolbar_FileOpen] = wxGetBitmapFromMemory(Toolbar_Open3_png);
m_Bitmaps[Toolbar_Refresh] = wxGetBitmapFromMemory(Toolbar_Refresh3_png);
m_Bitmaps[Toolbar_Browse] = wxGetBitmapFromMemory(Toolbar_Browse3_png);
m_Bitmaps[Toolbar_Play] = wxGetBitmapFromMemory(Toolbar_Play3_png);
m_Bitmaps[Toolbar_Stop] = wxGetBitmapFromMemory(Toolbar_Stop3_png);
m_Bitmaps[Toolbar_Pause] = wxGetBitmapFromMemory(Toolbar_Pause3_png);
m_Bitmaps[Toolbar_ConfigMain] = wxGetBitmapFromMemory(Toolbar_Options3_png);
m_Bitmaps[Toolbar_ConfigGFX] = wxGetBitmapFromMemory(Toolbar_Gfx3_png);
m_Bitmaps[Toolbar_ConfigDSP] = wxGetBitmapFromMemory(Toolbar_DSP3_png);
m_Bitmaps[Toolbar_ConfigPAD] = wxGetBitmapFromMemory(Toolbar_Pad3_png);
m_Bitmaps[Toolbar_Wiimote] = wxGetBitmapFromMemory(Toolbar_Wiimote3_png);
m_Bitmaps[Toolbar_Screenshot] = wxGetBitmapFromMemory(Toolbar_Fullscreen3_png);
m_Bitmaps[Toolbar_FullScreen] = wxGetBitmapFromMemory(Toolbar_Fullscreen3_png);
m_Bitmaps[Toolbar_Help] = wxGetBitmapFromMemory(Toolbar_Help3_png);
}
break;

default: PanicAlertT("Theme selection went wrong");
}
wxString dir(File::GetUserPath(D_THEMES_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name + "/");

m_Bitmaps[Toolbar_FileOpen].LoadFile(dir + "open.png", wxBITMAP_TYPE_PNG);
m_Bitmaps[Toolbar_Refresh].LoadFile(dir + "refresh.png", wxBITMAP_TYPE_PNG);
m_Bitmaps[Toolbar_Browse].LoadFile(dir + "browse.png", wxBITMAP_TYPE_PNG);
m_Bitmaps[Toolbar_Play].LoadFile(dir + "play.png", wxBITMAP_TYPE_PNG);
m_Bitmaps[Toolbar_Stop].LoadFile(dir + "stop.png", wxBITMAP_TYPE_PNG);
m_Bitmaps[Toolbar_Pause].LoadFile(dir + "pause.png", wxBITMAP_TYPE_PNG);
m_Bitmaps[Toolbar_ConfigMain].LoadFile(dir + "config.png", wxBITMAP_TYPE_PNG);
m_Bitmaps[Toolbar_ConfigGFX].LoadFile(dir + "graphics.png", wxBITMAP_TYPE_PNG);
m_Bitmaps[Toolbar_ConfigDSP].LoadFile(dir + "dsp.png", wxBITMAP_TYPE_PNG);
m_Bitmaps[Toolbar_ConfigPAD].LoadFile(dir + "gcpad.png", wxBITMAP_TYPE_PNG);
m_Bitmaps[Toolbar_Wiimote].LoadFile(dir + "wiimote.png", wxBITMAP_TYPE_PNG);
m_Bitmaps[Toolbar_Screenshot].LoadFile(dir + "screenshot.png", wxBITMAP_TYPE_PNG);
m_Bitmaps[Toolbar_FullScreen].LoadFile(dir + "fullscreen.png", wxBITMAP_TYPE_PNG);
m_Bitmaps[Toolbar_Help].LoadFile(dir + "help.png", wxBITMAP_TYPE_PNG);

// Update in case the bitmap has been updated
if (m_ToolBar != NULL) RecreateToolbar();
if (m_ToolBar != NULL)
RecreateToolbar();
}

// Menu items
Expand Down
2 changes: 0 additions & 2 deletions Source/Core/DolphinWX/Src/Globals.h
Expand Up @@ -26,8 +26,6 @@

enum
{
Toolbar_DebugGo,
Toolbar_DebugPause,
Toolbar_Step,
Toolbar_StepOver,
Toolbar_Skip,
Expand Down
312 changes: 0 additions & 312 deletions Source/Core/DolphinWX/resources/Boomy.h

This file was deleted.

3,651 changes: 0 additions & 3,651 deletions Source/Core/DolphinWX/resources/KDE.h

This file was deleted.

2,751 changes: 0 additions & 2,751 deletions Source/Core/DolphinWX/resources/Vista.h

This file was deleted.

3,040 changes: 0 additions & 3,040 deletions Source/Core/DolphinWX/resources/X-Plastik.h

This file was deleted.

303 changes: 0 additions & 303 deletions Source/Core/DolphinWX/resources/toolbar_browse.c

This file was deleted.

202 changes: 0 additions & 202 deletions Source/Core/DolphinWX/resources/toolbar_browse.xpm

This file was deleted.

277 changes: 0 additions & 277 deletions Source/Core/DolphinWX/resources/toolbar_debugger_pause.c

This file was deleted.

278 changes: 0 additions & 278 deletions Source/Core/DolphinWX/resources/toolbar_debugger_play.c

This file was deleted.

214 changes: 0 additions & 214 deletions Source/Core/DolphinWX/resources/toolbar_file_open.c

This file was deleted.

141 changes: 0 additions & 141 deletions Source/Core/DolphinWX/resources/toolbar_file_open.xpm

This file was deleted.

209 changes: 0 additions & 209 deletions Source/Core/DolphinWX/resources/toolbar_fullscreen.c

This file was deleted.

132 changes: 0 additions & 132 deletions Source/Core/DolphinWX/resources/toolbar_fullscreen.xpm

This file was deleted.

306 changes: 0 additions & 306 deletions Source/Core/DolphinWX/resources/toolbar_help.c

This file was deleted.

283 changes: 0 additions & 283 deletions Source/Core/DolphinWX/resources/toolbar_help.xpm

This file was deleted.

277 changes: 0 additions & 277 deletions Source/Core/DolphinWX/resources/toolbar_pause.c

This file was deleted.

148 changes: 0 additions & 148 deletions Source/Core/DolphinWX/resources/toolbar_pause.xpm

This file was deleted.

278 changes: 0 additions & 278 deletions Source/Core/DolphinWX/resources/toolbar_play.c

This file was deleted.

149 changes: 0 additions & 149 deletions Source/Core/DolphinWX/resources/toolbar_play.xpm

This file was deleted.

316 changes: 0 additions & 316 deletions Source/Core/DolphinWX/resources/toolbar_plugin_dsp.c

This file was deleted.

303 changes: 0 additions & 303 deletions Source/Core/DolphinWX/resources/toolbar_plugin_dsp.xpm

This file was deleted.

291 changes: 0 additions & 291 deletions Source/Core/DolphinWX/resources/toolbar_plugin_gfx.c

This file was deleted.

310 changes: 0 additions & 310 deletions Source/Core/DolphinWX/resources/toolbar_plugin_gfx.xpm

This file was deleted.