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

Auto-open configured group windows at startup #162

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jrick
Copy link
Member

@jrick jrick commented Jun 27, 2020

A [groups] section is added to the zkclient config file and must
specify 'index = name' pairs for each group name and the window index.

This is handy to keep groupchat windows in a common location across
client restarts.

# Joined groups can be auto-opened in a specified order.
# Each key describes the window index, and the value must be the group name.
# Indexes begin at 1 due to index 0 being reserved for the console window.
[groups]
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we get rid of the section and use the following notation instead:
group[1] = firstgroup
group[2] = secondgroup

Copy link
Member Author

Choose a reason for hiding this comment

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

this would complicate the parsing as well as the error handling when indexes are missing, but could be done.

because the ini package decodes into a map, we can't (easily) iterate through the settings in the file order either. using a unique section for only these settings allows us to at least initially know how many k/v fields were set.

I'm also thinking that we should use autoopen as the section name (or top-level 'autoopen[N]' keys) in case we want to distinguish between groups and direct chats in the value.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sections in INI are worse than INI itself imo. Really would prefer named arrays of sorts. chat[1] group[3] etc.

@jrick jrick mentioned this pull request Jul 9, 2020
A [groups] section is added to the zkclient config file and must
specify 'index = name' pairs for each group name and the window index.

This is handy to keep groupchat windows in a common location across
client restarts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants