Fixed heap leaks issue with KDE #988

git-svn-id: svn://ultimatepp.org/upp/trunk@8191 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2015-02-21 17:53:19 +00:00
parent 57469504df
commit bbb6f7dacd
3 changed files with 9 additions and 2 deletions

View file

@ -26,8 +26,14 @@ void _DBG_Ungrab(void)
void Ctrl::PanicMsgBox(const char *title, const char *text)
{
LLOG("PanicMsgBox " << title << ": " << text);
if(system("which gxmessage") == 0)
IGNORE_RESULT(system(String().Cat() << "gxmessage -center \"" << title << "\n" << text << "\""));
else
if(system("which kdialog") == 0)
IGNORE_RESULT(system(String().Cat() << "kdialog --error \"" << title << "\n" << text << "\""));
else
if(system("which xmessage") == 0)
system(String().Cat() << "xmessage -center \"" << title << "\n" << text << "\"");
IGNORE_RESULT(system(String().Cat() << "xmessage -center \"" << title << "\n" << text << "\""));
else {
_DBG_Ungrab();
GtkWidget *dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR,

View file

@ -8,6 +8,7 @@ NAMESPACE_UPP
void Ctrl::Create(Ctrl *owner, bool popup)
{
MemoryIgnoreLeaksBlock ___;
GuiLock __;
ASSERT_(IsMainThread(), "Only the main thread can open a window");
LLOG("Create " << Name() << " " << GetRect());

View file

@ -3,7 +3,7 @@
#include "Draw/init"
#include "plugin\bmp/init"
#include "RichText/init"
#define BLITZ_INDEX__ Fe2ff541f9bb9f4ad3f5bcc23a34e1b73
#define BLITZ_INDEX__ F656a4ea94e4f808b1ec63034b0e6c5ac
#include "CtrlCore.icpp"
#undef BLITZ_INDEX__
#endif