diff options
Diffstat (limited to 'c')
-rw-r--r-- | c/layout.h | 11 | ||||
-rw-r--r-- | c/main.cpp | 8 |
2 files changed, 15 insertions, 4 deletions
@@ -5,6 +5,7 @@ #include "common.h" #include "datalistview.h" +#include "pl.h" void UpdateLayout(int w = 0, int h = 0); @@ -44,6 +45,7 @@ inline bool Dragger::HandleDown() if (IsDouble()) { extern DataListView* g_dlv; g_dlv->SetHeight(0); + Pl("cfg","set_dlv_height",0); UpdateLayout(); return false; } else @@ -62,10 +64,13 @@ inline bool Dragger::HandleMove() SetCursor(g_hcSizeNs); else r = false; - if (m_bActive) - Drag(pt.x, pt.y); - if (!IsDown()) + if (!m_bActive) return r; + Drag(pt.x, pt.y); + if (!IsDown()) { + extern DataListView* g_dlv; m_bActive = false; + Pl("cfg","set_dlv_height",g_dlv->Height()); + } return r; } @@ -193,11 +193,17 @@ static LRESULT CALLBACK CBTProc(const int nCode, const WPARAM wParam, const LPAR g_elv = new EpisodeListView(g_hWnd); /* Get saved view settings. */ - char* s; Pl("cfg","get_view_watched",&g_bViewWatched); Pl("cfg","get_view_tv_original",&g_bViewTVOriginal); + + char* s; if (Pl("cfg","get_limit_screenwriter",&s)) strcpy_s(g_currentScreenwriter, sizeof(g_currentScreenwriter), s); + + int dlvHeight = 0; + Pl("cfg","get_dlv_height",&dlvHeight); + g_dlv->SetHeight(dlvHeight); + return 0; } |