Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPP RTL: Floating panel movement fix #10586

Closed

Conversation

Ashfaaq18
Copy link
Contributor

fix #10579

tested LTR and RTL, works as expected on both layouts.
Still got to fix the docking of the panels in RTL format, will need to open another issue for it.

@donho donho self-assigned this Sep 23, 2021
@Yaron10
Copy link

Yaron10 commented Sep 23, 2021

@Ashfaaq18,

Great work as always. 👍
You're officially the NPP RTL master. :)

Thank you very much.


Still got to fix the docking of the panels in RTL format, will need to open another issue for it.

👍

@Ashfaaq18
Copy link
Contributor Author

Great work as always. 👍
You're officially the NPP RTL master. :)

Haha, Thank you @Yaron10 and @donho for all the support.

@donho donho added the accepted label Sep 23, 2021
@donho
Copy link
Member

donho commented Sep 23, 2021

Thank you both @Yaron10 & @Ashfaaq18 to make RTL great again!

@Yaron10
Copy link

Yaron10 commented Sep 23, 2021

The thanks and flowers to @Ashfaaq18.
He has fixed some major RTL issues in a short time. Professional and clever!

"Make RTL Great Again". An interesting paraphrase. :)

@donho donho closed this in d939e4a Sep 27, 2021
@Yaron10
Copy link

Yaron10 commented Oct 9, 2021

@Ashfaaq18,

Still got to fix the docking of the panels in RTL format, will need to open another issue for it.

Should I open the issue?


OFF-TOPIC:

(I know it's not your code).

TaskLstFnStatus *tl = new TaskLstFnStatus(fileNameStatus._iView, fileNameStatus._docIndex, fileNameStatus._fn, fileNameStatus._status, (void *)fileNameStatus._bufID);

TaskLstFnStatus *tl = new TaskLstFnStatus(iView, 0, buf->getFullPathName(), 0, (void *)bufferID);

Shouldn't there be delete statements after those new calls?
If positive, I think there are quite a few similar cases throughout NPP code.

Thank you.

@Ashfaaq18
Copy link
Contributor Author

Ashfaaq18 commented Oct 9, 2021

@Ashfaaq18,

Still got to fix the docking of the panels in RTL format, will need to open another issue for it.

Should I open the issue?

Yeah, sure.

OFF-TOPIC:

(I know it's not your code).

TaskLstFnStatus *tl = new TaskLstFnStatus(fileNameStatus._iView, fileNameStatus._docIndex, fileNameStatus._fn, fileNameStatus._status, (void *)fileNameStatus._bufID);

TaskLstFnStatus *tl = new TaskLstFnStatus(iView, 0, buf->getFullPathName(), 0, (void *)bufferID);

Shouldn't there be delete statements after those new calls? If positive, I think there are quite a few similar cases throughout NPP code.

Thank you.

I think they do get deleted when the application exits, Its the "delete tlfs" lines in the below 2 code snippets.

This one below is called when the application exits and when a file is closed.

void VerticalFileSwitcherListView::remove(int index)
{
LVITEM item;
item.mask = LVIF_PARAM;
item.iItem = index;
ListView_GetItem(_hSelf, &item);
TaskLstFnStatus *tlfs = (TaskLstFnStatus *)item.lParam;
delete tlfs;
ListView_DeleteItem(_hSelf, index);
}

This is called only on application exit

void VerticalFileSwitcherListView::destroy()
{
LVITEM item;
item.mask = LVIF_PARAM;
int nbItem = ListView_GetItemCount(_hSelf);
for (int i = 0 ; i < nbItem ; ++i)
{
item.iItem = i;
ListView_GetItem(_hSelf, &item);
TaskLstFnStatus *tlfs = (TaskLstFnStatus *)item.lParam;
delete tlfs;
}
::DestroyWindow(_hSelf);
_hSelf = NULL;
}

@Yaron10
Copy link

Yaron10 commented Oct 9, 2021

#10641.


I think they do get deleted when the application exits...

Great.
Thank you for looking into it and enlightening me. 👍

@Ashfaaq18 Ashfaaq18 deleted the NppRTL_floatingPanelFix branch October 10, 2021 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NPP RTL: Floating panels can not be moved
3 participants