mirror of
https://github.com/UberGames/GtkRadiant.git
synced 2024-11-22 11:51:22 +00:00
fixed crash on disabling lighting
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@15 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
parent
02d9607a65
commit
98364b324c
6 changed files with 15 additions and 9 deletions
4
CHANGES
4
CHANGES
|
@ -1,6 +1,10 @@
|
|||
This is the changelog for developers, != changelog for the end user
|
||||
that we distribute with the binaries. (see changelog)
|
||||
|
||||
20/02/2006
|
||||
SPoG
|
||||
- Fixed crash when disabling lighting for a second time.
|
||||
|
||||
19/02/2006
|
||||
SPoG
|
||||
- Fixed crash when loading invalid ASE models.
|
||||
|
|
|
@ -528,7 +528,7 @@ GClosure* global_accel_group_find(Accelerator accelerator)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void command_connect_accelerator(const Accelerator& accelerator, const Callback& callback)
|
||||
void global_accel_group_connect(const Accelerator& accelerator, const Callback& callback)
|
||||
{
|
||||
if(accelerator.key != 0)
|
||||
{
|
||||
|
@ -536,7 +536,7 @@ void command_connect_accelerator(const Accelerator& accelerator, const Callback&
|
|||
}
|
||||
}
|
||||
|
||||
void command_disconnect_accelerator(const Accelerator& accelerator, const Callback& callback)
|
||||
void global_accel_group_disconnect(const Accelerator& accelerator, const Callback& callback)
|
||||
{
|
||||
if(accelerator.key != 0)
|
||||
{
|
||||
|
|
|
@ -71,8 +71,8 @@ void global_accel_destroy();
|
|||
|
||||
GClosure* global_accel_group_find(Accelerator accelerator);
|
||||
|
||||
void command_connect_accelerator(const Accelerator& accelerator, const Callback& callback);
|
||||
void command_disconnect_accelerator(const Accelerator& accelerator, const Callback& callback);
|
||||
void global_accel_group_connect(const Accelerator& accelerator, const Callback& callback);
|
||||
void global_accel_group_disconnect(const Accelerator& accelerator, const Callback& callback);
|
||||
|
||||
|
||||
class Command
|
||||
|
|
|
@ -1177,6 +1177,7 @@ public:
|
|||
{
|
||||
GlobalTexturesCache().release((*i).texture());
|
||||
}
|
||||
m_layers.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1930,6 +1930,7 @@ void Camera_registerPreferencesPage()
|
|||
|
||||
typedef FreeCaller1<bool, CamWnd_Move_Discrete_Import> CamWndMoveDiscreteImportCaller;
|
||||
|
||||
/// \brief Initialisation for things that have the same lifespan as this module.
|
||||
void CamWnd_Construct()
|
||||
{
|
||||
GlobalCommands_insert("CenterView", FreeCaller<GlobalCamera_ResetAngles>(), Accelerator(GDK_End));
|
||||
|
|
|
@ -54,27 +54,27 @@ void command_connect_accelerator(const char* name)
|
|||
{
|
||||
const Command& command = GlobalCommands_find(name);
|
||||
GlobalShortcuts_register(name);
|
||||
command_connect_accelerator(command.m_accelerator, command.m_callback);
|
||||
global_accel_group_connect(command.m_accelerator, command.m_callback);
|
||||
}
|
||||
|
||||
void command_disconnect_accelerator(const char* name)
|
||||
{
|
||||
const Command& command = GlobalCommands_find(name);
|
||||
command_disconnect_accelerator(command.m_accelerator, command.m_callback);
|
||||
global_accel_group_disconnect(command.m_accelerator, command.m_callback);
|
||||
}
|
||||
|
||||
void toggle_add_accelerator(const char* name)
|
||||
{
|
||||
const Toggle& toggle = GlobalToggles_find(name);
|
||||
GlobalShortcuts_register(name);
|
||||
command_connect_accelerator(toggle.m_command.m_accelerator, toggle.m_command.m_callback);
|
||||
global_accel_group_connect(toggle.m_command.m_accelerator, toggle.m_command.m_callback);
|
||||
}
|
||||
|
||||
GtkCheckMenuItem* create_check_menu_item_with_mnemonic(GtkMenu* menu, const char* mnemonic, const char* commandName)
|
||||
{
|
||||
GlobalShortcuts_register(commandName);
|
||||
const Toggle& toggle = GlobalToggles_find(commandName);
|
||||
command_connect_accelerator(toggle.m_command.m_accelerator, toggle.m_command.m_callback);
|
||||
global_accel_group_connect(toggle.m_command.m_accelerator, toggle.m_command.m_callback);
|
||||
return create_check_menu_item_with_mnemonic(menu, mnemonic, toggle);
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ GtkMenuItem* create_menu_item_with_mnemonic(GtkMenu* menu, const char *mnemonic,
|
|||
{
|
||||
GlobalShortcuts_register(commandName);
|
||||
const Command& command = GlobalCommands_find(commandName);
|
||||
command_connect_accelerator(command.m_accelerator, command.m_callback);
|
||||
global_accel_group_connect(command.m_accelerator, command.m_callback);
|
||||
return create_menu_item_with_mnemonic(menu, mnemonic, command);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue