Skip to content

Commit

Permalink
MenuItem Update
Browse files Browse the repository at this point in the history
  • Loading branch information
steve02081504 committed Mar 4, 2022
1 parent fc84915 commit 4215435
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion my-gists
Submodule my-gists updated 1 files
+3 −0 ukagaka/sstp.hpp
11 changes: 9 additions & 2 deletions tama.cpp
Expand Up @@ -826,8 +826,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
ClientToScreen(hEdit, &pt);
CheckMenuItem(hSubMenu, ID_TAMA_REQUEST, (reqshow == SW_SHOW) ? 8 : 0);
CheckMenuItem(hSubMenu, ID_TAMA_RECEIVE, (receive) ? 8 : 0);
EnableMenuItem(hSubMenu, ID_TAMA_UNLOAD, (dllpath.size()) ? MF_ENABLED : MF_GRAYED);
EnableMenuItem(hSubMenu, ID_TAMA_RELOAD, (dllpath.size() || b_dllpath.size()) ? MF_ENABLED : MF_GRAYED);
EnableMenuItem(hSubMenu, ID_TAMA_REQUEST, (dllpath.size()) ? MF_ENABLED : MF_GRAYED);
EnableMenuItem(hSubMenu, ID_TAMA_UNLOAD, (dllpath.size() || linker.was_linked_to_ghost()) ? MF_ENABLED : MF_GRAYED);
EnableMenuItem(hSubMenu, ID_TAMA_RELOAD, (dllpath.size() || b_dllpath.size() || linker.was_linked_to_ghost()) ? MF_ENABLED : MF_GRAYED);
TrackPopupMenu(hSubMenu, TPM_LEFTALIGN, pt.x, pt.y, 0, hWnd, NULL);
DestroyMenu(hMenu);
}
Expand Down Expand Up @@ -870,6 +871,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
dllpath = b_dllpath;
ExecLoad();
}
else if(linker.was_linked_to_ghost()) {
linker.SEND({{L"Script", L"\\![reload,shiori]"}});
}
break;
case ID_TAMA_UNLOAD:
// unload
Expand All @@ -878,6 +882,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
b_dllpath = dllpath;
dllpath.clear();
}
else if(linker.was_linked_to_ghost()) {
linker.SEND({{L"Script", L"\\![unload,shiori]"}});
}
break;
case ID_TAMA_COPY:
// クリップボードへコピー
Expand Down

0 comments on commit 4215435

Please sign in to comment.