Skip to content

Group selection doesn't work, more than one radiobutton active #166

Description

@cdt2025

Rightclick on the tray icon shows the context menu with the list of groups.
Clicking on a new group, the group changes, the new group's radiobutton should be active.
Since a few days/weeks? the old group also stays active, that means I can click all the groups, one after the other, and all radiobuttons turn active.
Since yesterday I realized that the first group I cannot choose at all, better said the notes of the group don't appear on screen.
Choosing groups by menu Manage Notes works fine though.
The error appears also after creating new notes.json, also on a different machine.

Machine:
Linux Mint 22.3 Cinnamon, pretty standard installation

Activity

  1. cdt2025 commented on Mar 16, 2026

    @cdt2025
    Author

    I took a look into the sources. Looks like every group is a radiomenu for itself. That's why they don't toggle off.
    The changelog says sth. about not reconstructing the menu with every change anymore. So this behavior will probably be a side effect of that change.
    A fix like this should help, at least it seems to work for me...

    def rebuild_tray_context_menu(self):
    ...
    self.context_menu.append(Gtk.SeparatorMenuItem())

        radio_group_first_item = None
        active_group = self.settings.get_string('active-group')
    
        for group in self.file_handler.get_note_group_names():
            if radio_group_first_item is None:
                item = Gtk.RadioMenuItem.new_with_label(None, group)
                radio_group_first_item = item
            else:
                item = Gtk.RadioMenuItem.new_with_label_from_widget(radio_group_first_item, group)
    
            item.set_active(group == active_group)
            item.connect('toggled', self.on_tray_group_selected, group)
    
            self.context_menu.append(item)
    
        self.context_menu.append(Gtk.SeparatorMenuItem())
    

    ...

  2. added a commit that references this issue on Apr 23, 2026
    1648aee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions