Release v0.6.42: use compact pinned checkbox beside history search
This commit is contained in:
1 parent
684ca1b3cc
commit
a2b88f247c
9 files changed
+26
-28
No files matched your search
+8
-11
@@ -514,7 +514,7 @@ void search(HWND w, HistoryView *v)
|
||||
v->previewActive = std::make_shared<std::atomic<bool>>(true);
|
||||
v->closed = false;
|
||||
auto q = value(w, 101);
|
||||
const bool pinnedOnly = SendDlgItemMessageW(w, 117, CB_GETCURSEL, 0, 0) == 1;
|
||||
const bool pinnedOnly = SendDlgItemMessageW(w, 117, BM_GETCHECK, 0, 0) == BST_CHECKED;
|
||||
auto generation = ++v->generation;
|
||||
v->pending.clear();
|
||||
auto *app = v->app;
|
||||
@@ -740,7 +740,7 @@ LRESULT CALLBACK historyProc(HWND w, UINT msg, WPARAM wp, LPARAM lp)
|
||||
case WM_COMMAND:
|
||||
{
|
||||
int id = LOWORD(wp);
|
||||
if (id == 117 && HIWORD(wp) == CBN_SELCHANGE)
|
||||
if (id == 117 && HIWORD(wp) == BN_CLICKED)
|
||||
{
|
||||
KillTimer(w, 1);
|
||||
search(w, v);
|
||||
@@ -918,7 +918,7 @@ LRESULT CALLBACK historyProc(HWND w, UINT msg, WPARAM wp, LPARAM lp)
|
||||
int top = (int)SendDlgItemMessageW(w,102,LB_GETTOPINDEX,0,0);
|
||||
v->rememberedTop = top >= 0 && top < (int)v->items.size() ? v->items[top].id : L"";
|
||||
v->app->saveHistoryView(v->rememberedSelection, v->rememberedTop, value(w, 101),
|
||||
SendDlgItemMessageW(w, 117, CB_GETCURSEL, 0, 0) == 1);
|
||||
SendDlgItemMessageW(w, 117, BM_GETCHECK, 0, 0) == BST_CHECKED);
|
||||
KillTimer(w, 1);
|
||||
v->closed = true;
|
||||
v->previewActive->store(false);
|
||||
@@ -1745,14 +1745,11 @@ void showHistory(App &app, bool visible)
|
||||
HWND w = makeWindow(app, L"KSwitcher.History", L"Clipboard history", historyProc, 760, 500);
|
||||
app.historyWindow = w;
|
||||
windowLayoutState(w)->history = true;
|
||||
label(w, L"&Filter", 16, 12, 170);
|
||||
auto filter = control(w, L"COMBOBOX", L"", WS_TABSTOP | CBS_DROPDOWNLIST | WS_VSCROLL,
|
||||
117, 16, 38, 170, 100);
|
||||
SendMessageW(filter, CB_ADDSTRING, 0, (LPARAM)L"All items");
|
||||
SendMessageW(filter, CB_ADDSTRING, 0, (LPARAM)L"★ Pinned only");
|
||||
SendMessageW(filter, CB_SETCURSEL, app.historyPinnedOnly ? 1 : 0, 0);
|
||||
label(w, L"&Search clipboard history", 194, 12, 500);
|
||||
edit(w, 101, 194, 38, 550);
|
||||
auto filter = control(w, L"BUTTON", L"★ Pinned only", WS_TABSTOP | BS_AUTOCHECKBOX,
|
||||
117, 16, 38, 112, 25);
|
||||
SendMessageW(filter, BM_SETCHECK, app.historyPinnedOnly ? BST_CHECKED : BST_UNCHECKED, 0);
|
||||
label(w, L"&Search clipboard history", 136, 12, 500);
|
||||
edit(w, 101, 136, 38, 608);
|
||||
auto list = control(w, L"LISTBOX", L"",
|
||||
WS_TABSTOP | WS_VSCROLL | LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | WS_BORDER |
|
||||
LBS_OWNERDRAWFIXED | LBS_HASSTRINGS,
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
#include "platform.h"
|
||||
namespace ks
|
||||
{
|
||||
inline constexpr wchar_t AppVersion[] = L"0.6.41";
|
||||
inline constexpr wchar_t AppVersion[] = L"0.6.42";
|
||||
inline constexpr UINT UpdateMessage = WM_APP + 7;
|
||||
inline constexpr UINT UpdateCheckIntervalMs = 6 * 60 * 60 * 1000;
|
||||
inline constexpr UINT UpdateNotificationRetryMs = 5 * 60 * 1000;
|
||||
|
||||
Reference in new issue
Block a user