diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-15 13:16:46 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-15 13:16:46 +0000 |
commit | 80d0910aafedcb860aad11995aab0dc0ca3d7585 (patch) | |
tree | 791175ca80a5b1aa873c248a325263a01dd76698 | |
parent | 0bc5a39c53b1422b980f210c1d418fcfde5b14ad (diff) |
added check for wrong splitter coordinates
git-svn-id: http://svn.miranda-ng.org/main/trunk@7665 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/Scriver/src/chat/main.cpp | 2 | ||||
-rw-r--r-- | src/modules/chat/chat_opts.cpp | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/plugins/Scriver/src/chat/main.cpp b/plugins/Scriver/src/chat/main.cpp index 160683beab..9973b86497 100644 --- a/plugins/Scriver/src/chat/main.cpp +++ b/plugins/Scriver/src/chat/main.cpp @@ -96,11 +96,9 @@ int Chat_ModulesLoaded(WPARAM wParam,LPARAM lParam) void LoadIcons(void)
{
LoadMsgLogBitmaps();
- return ;
}
void FreeIcons(void)
{
FreeMsgLogBitmaps();
- return;
}
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"));
|