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

PCP-related changes for column handling; code cleanups #1182

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

natoscott
Copy link
Member

No description provided.

Copy link
Member

@BenBE BenBE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please avoid the merge commits inside the PR by rebasing onto some recent commit after the last merge.

I don't quite like the global variable in the ActiveColumnsPanel commit as it introduces uncontrolled global state and thus state dependencies.

char* currentScreen = newFocus->ss->name;
DynamicScreen_availableColumns(currentScreen);
} else {
Panel* availableColumns = AvailableColumnsPanel_get();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing NULL check.

}

void PCPDynamicScreens_availableColumns(Hashtable* screens, char* currentScreen) {
Panel* availableColumns = AvailableColumnsPanel_get();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing NULL check.

for (unsigned int j = 0; j < screen->totalColumns; j++) {
PCPDynamicColumn* column = &screen->columns[j];

column->id = columns->offset + columns->cursor;
columns->cursor++;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this cursor still necessary when we index over the array instead of the cursor?

'actionTogglePauseProcessUpdate' -> 'actionTogglePauseUpdate'
'pauseProcessUpdate' -> 'pauseUpdate'
'hideProcessSelection' -> 'hideSelection'
'hideProcessSelection' -> 'hideSelection'

Signed-off-by: Sohaib Mohamed <[email protected]>
Signed-off-by: Sohaib Mohamed <[email protected]>
Signed-off-by: Sohaib Mohamed <[email protected]>
@BenBE BenBE changed the title Fix an erroneous memset pointer PCP-related changes for column handling; code cleanups Feb 4, 2023
@BenBE BenBE added code quality ♻️ Code quality enhancement PCP PCP related issues labels Feb 4, 2023
@BenBE BenBE mentioned this pull request Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code quality ♻️ Code quality enhancement PCP PCP related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants