From 80d0910aafedcb860aad11995aab0dc0ca3d7585 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 15 Jan 2014 13:16:46 +0000 Subject: added check for wrong splitter coordinates git-svn-id: http://svn.miranda-ng.org/main/trunk@7665 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/chat/chat_opts.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/modules/chat/chat_opts.cpp b/src/modules/chat/chat_opts.cpp index eb1dae31ce..9702417678 100644 --- a/src/modules/chat/chat_opts.cpp +++ b/src/modules/chat/chat_opts.cpp @@ -322,12 +322,18 @@ int OptionsInit(void) ci.pSettings->UserListFont = NULL; ci.pSettings->UserListHeadingsFont = NULL; ci.pSettings->MessageBoxFont = NULL; - ci.pSettings->iSplitterX = db_get_w(NULL, "Chat", "SplitterX", 105); - ci.pSettings->iSplitterY = db_get_w(NULL, "Chat", "SplitterY", 90); ci.pSettings->iX = db_get_dw(NULL, "Chat", "roomx", -1); ci.pSettings->iY = db_get_dw(NULL, "Chat", "roomy", -1); ci.pSettings->iWidth = db_get_dw(NULL, "Chat", "roomwidth", -1); ci.pSettings->iHeight = db_get_dw(NULL, "Chat", "roomheight", -1); + + ci.pSettings->iSplitterX = db_get_w(NULL, "Chat", "SplitterX", 105); + if (ci.pSettings->iSplitterX <= 50) + ci.pSettings->iSplitterX = 105; + ci.pSettings->iSplitterY = db_get_w(NULL, "Chat", "SplitterY", 50); + if (ci.pSettings->iSplitterY <= 20) + ci.pSettings->iSplitterY = 50; + LoadGlobalSettings(); SkinAddNewSoundEx("ChatMessage", LPGEN("Group chats"), LPGEN("Incoming message")); -- cgit v1.2.3