[Github-comments] [geany/geany] Modify/Extend Stash Settings API (PR #3000)

xiota notifications at xxxxx
Mon Nov 15 07:27:33 UTC 2021


Force push because got git branches mixed up.  `get_stash_groups()` is to make testing easier without recompiling Geany.  Probaby won't be in the final PR.  Functions to access 
```C
GPtrArray *get_stash_groups();  // To make testing easier.  Will probably be removed in final PR.

StashGroup *stash_group_get_group(const gchar *group_name, const gchar *key_name);

StashPref *stash_group_get_pref_by_name(StashGroup *group, const gchar *key_name);
```
Example - list all groups and names:
```C++
  GPtrArray *test = get_stash_groups();

  gpointer item;
  guint i;
  foreach_ptr_array(item, i, test) {
    if (item) {
      StashGroup *group = (StashGroup *)item;
      msgwin_status_add("group = %s", group->name);
    }
  }
```
Output:
```
group = geany
group = geany
group = geany
group = geany
group = geany
group = build-menu
group = geany
group = search
group = search
group = search
group = search
group = plugins
group = geany
group = VTE
```
Notably, in `keyfile.c`, groups with the same name (geany and search) are created multiple times.  Why?  Is it necessary?  Would it work if the old group with the same name is returned instead of a brand new group?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3000#issuecomment-968607037
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211114/fe5cea6c/attachment.htm>


More information about the Github-comments mailing list