mirror of https://github.com/buggins/dlangui.git
remove excessive logging
This commit is contained in:
parent
233adaace3
commit
b769f5f3ec
|
@ -300,13 +300,13 @@ class FreeTypeFont : Font {
|
|||
_fontItem = item;
|
||||
_size = size;
|
||||
_height = size;
|
||||
Log.d("Created font, count=", ++_instanceCount);
|
||||
debug Log.d("Created font, count=", ++_instanceCount);
|
||||
}
|
||||
|
||||
/// do cleanup
|
||||
~this() {
|
||||
clear();
|
||||
Log.d("Destroyed font, count=", --_instanceCount);
|
||||
debug Log.d("Destroyed font, count=", --_instanceCount);
|
||||
}
|
||||
|
||||
private int _size;
|
||||
|
@ -451,14 +451,14 @@ class FreeTypeFontManager : FontManager {
|
|||
}
|
||||
}
|
||||
~this() {
|
||||
Log.d("FreeTypeFontManager ~this()");
|
||||
debug Log.d("FreeTypeFontManager ~this()");
|
||||
//_activeFonts.clear();
|
||||
foreach(ref FontFileItem item; _fontFiles) {
|
||||
destroy(item);
|
||||
item = null;
|
||||
}
|
||||
_fontFiles.length = 0;
|
||||
Log.d("Destroyed all fonts. Freeing library.");
|
||||
debug Log.d("Destroyed all fonts. Freeing library.");
|
||||
// uninit library
|
||||
if (_library)
|
||||
FT_Done_FreeType(_library);
|
||||
|
|
|
@ -493,9 +493,6 @@ class StateDrawable : Drawable {
|
|||
foreach(ref item; _stateList)
|
||||
if (item.matchState(state)) {
|
||||
if (!item.drawable.isNull) {
|
||||
if (state & State.Checked) {
|
||||
Log.d("Found item for checked state: ", item.stateMask, " ", item.stateValue);
|
||||
}
|
||||
item.drawable.drawTo(buf, rc, state, tilex0, tiley0);
|
||||
}
|
||||
return;
|
||||
|
@ -610,10 +607,10 @@ class ImageCache {
|
|||
}
|
||||
|
||||
this() {
|
||||
Log.i("Creating ImageCache");
|
||||
debug Log.i("Creating ImageCache");
|
||||
}
|
||||
~this() {
|
||||
Log.i("Destroying ImageCache");
|
||||
debug Log.i("Destroying ImageCache");
|
||||
foreach (ref item; _map) {
|
||||
destroy(item);
|
||||
item = null;
|
||||
|
@ -858,17 +855,16 @@ class DrawableCache {
|
|||
if (fn !is null) {
|
||||
_idToFileMap[id] = fn;
|
||||
return fn;
|
||||
} else {
|
||||
}
|
||||
}
|
||||
Log.w("resource ", id, " is not found");
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
this() {
|
||||
Log.i("Creating DrawableCache");
|
||||
debug Log.i("Creating DrawableCache");
|
||||
}
|
||||
~this() {
|
||||
Log.i("Destroying DrawableCache");
|
||||
debug Log.i("Destroying DrawableCache");
|
||||
foreach (ref item; _idToDrawableMap) {
|
||||
destroy(item);
|
||||
item = null;
|
||||
|
|
|
@ -125,13 +125,13 @@ class Window {
|
|||
_backgroundColor = 0xFFFFFF;
|
||||
}
|
||||
~this() {
|
||||
foreach(p; _popups)
|
||||
destroy(p);
|
||||
_popups = null;
|
||||
if (_mainWidget !is null) {
|
||||
destroy(_mainWidget);
|
||||
_mainWidget = null;
|
||||
}
|
||||
foreach(p; _popups)
|
||||
destroy(p);
|
||||
_popups = null;
|
||||
}
|
||||
|
||||
private void animate(Widget root, long interval) {
|
||||
|
|
|
@ -41,12 +41,12 @@ version(USE_SDL) {
|
|||
SDL_Renderer* _renderer;
|
||||
this(string caption, Window parent) {
|
||||
_caption = caption;
|
||||
Log.d("Creating SDL window");
|
||||
debug Log.d("Creating SDL window");
|
||||
create();
|
||||
}
|
||||
|
||||
~this() {
|
||||
Log.d("Destroying window");
|
||||
debug Log.d("Destroying SDL window");
|
||||
if (_renderer)
|
||||
SDL_DestroyRenderer(_renderer);
|
||||
if (_win)
|
||||
|
@ -124,7 +124,7 @@ version(USE_SDL) {
|
|||
}
|
||||
|
||||
void redraw() {
|
||||
Log.e("Widget instance count in SDLWindow.redraw: ", Widget.instanceCount());
|
||||
//Log.e("Widget instance count in SDLWindow.redraw: ", Widget.instanceCount());
|
||||
// check if size has been changed
|
||||
int w, h;
|
||||
SDL_GetWindowSize(_win,
|
||||
|
@ -610,11 +610,20 @@ version(USE_SDL) {
|
|||
|
||||
/// retrieves text from clipboard (when mouseBuffer == true, use mouse selection clipboard - under linux)
|
||||
override dstring getClipboardText(bool mouseBuffer = false) {
|
||||
if (!SDL_HasClipboardText())
|
||||
return ""d;
|
||||
char * txt = SDL_GetClipboardText();
|
||||
if (!txt)
|
||||
return ""d;
|
||||
string s = fromStringz(txt);
|
||||
SDL_free(txt);
|
||||
return toUTF32(s);
|
||||
}
|
||||
|
||||
/// sets text to clipboard (when mouseBuffer == true, use mouse selection clipboard - under linux)
|
||||
override void setClipboardText(dstring text, bool mouseBuffer = false) {
|
||||
string s = toUTF8(text);
|
||||
SDL_SetClipboardText(s.toStringz);
|
||||
}
|
||||
|
||||
protected SDLWindow[uint] _windowMap;
|
||||
|
@ -643,7 +652,7 @@ version(USE_SDL) {
|
|||
}
|
||||
catch (Throwable e) // catch any uncaught exceptions
|
||||
{
|
||||
MessageBox(null, toUTF16z(e.toString()), "Error",
|
||||
MessageBox(null, toUTF16z(e.toString ~ "\nStack trace:\n" ~ defaultTraceHandler.toString), "Error",
|
||||
MB_OK | MB_ICONEXCLAMATION);
|
||||
result = 0; // failed
|
||||
}
|
||||
|
|
|
@ -251,17 +251,17 @@ class Win32FontManager : FontManager {
|
|||
|
||||
/// initialize in constructor
|
||||
this() {
|
||||
Log.i("Creating Win32FontManager");
|
||||
debug Log.i("Creating Win32FontManager");
|
||||
//instance = this;
|
||||
init();
|
||||
}
|
||||
~this() {
|
||||
Log.i("Destroying Win32FontManager");
|
||||
debug Log.i("Destroying Win32FontManager");
|
||||
}
|
||||
|
||||
/// initialize font manager by enumerating of system fonts
|
||||
bool init() {
|
||||
Log.i("Win32FontManager.init()");
|
||||
debug Log.i("Win32FontManager.init()");
|
||||
Win32ColorDrawBuf drawbuf = new Win32ColorDrawBuf(1,1);
|
||||
LOGFONTA lf;
|
||||
lf.lfCharSet = ANSI_CHARSET; //DEFAULT_CHARSET;
|
||||
|
|
|
@ -248,7 +248,7 @@ class Win32Window : Window {
|
|||
}
|
||||
|
||||
~this() {
|
||||
Log.d("Window destructor");
|
||||
debug Log.d("Window destructor");
|
||||
version (USE_OPENGL) {
|
||||
import derelict.opengl3.wgl;
|
||||
if (_hGLRC) {
|
||||
|
|
|
@ -166,9 +166,6 @@ class ImageWidget : Widget {
|
|||
sz.y = img.height;
|
||||
applyAlign(rc, sz);
|
||||
uint st = state;
|
||||
if (state & State.Checked) {
|
||||
Log.d("Drawing image for checked state");
|
||||
}
|
||||
img.drawTo(buf, rc, st);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -456,12 +456,12 @@ class Style {
|
|||
_theme = theme;
|
||||
_parentStyle = theme;
|
||||
_id = id;
|
||||
Log.d("Created style ", _id, ", count=", ++_instanceCount);
|
||||
//Log.d("Created style ", _id, ", count=", ++_instanceCount);
|
||||
}
|
||||
|
||||
~this() {
|
||||
foreach(ref Style item; _substates) {
|
||||
Log.d("Destroying substate");
|
||||
//Log.d("Destroying substate");
|
||||
destroy(item);
|
||||
item = null;
|
||||
}
|
||||
|
@ -473,7 +473,7 @@ class Style {
|
|||
_children.clear();
|
||||
_backgroundDrawable.clear();
|
||||
_font.clear();
|
||||
Log.d("Destroyed style ", _id, ", parentId=", _parentId, ", state=", _stateMask, ", count=", --_instanceCount);
|
||||
//Log.d("Destroyed style ", _id, ", parentId=", _parentId, ", state=", _stateMask, ", count=", --_instanceCount);
|
||||
}
|
||||
|
||||
/// create named substyle of this style
|
||||
|
@ -537,7 +537,7 @@ class Theme : Style {
|
|||
}
|
||||
|
||||
~this() {
|
||||
Log.d("Theme destructor");
|
||||
//Log.d("Theme destructor");
|
||||
foreach(ref Style item; _byId) {
|
||||
destroy(item);
|
||||
item = null;
|
||||
|
|
Loading…
Reference in New Issue