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

background control panel, alpha level callbacks #613

Merged
merged 1 commit into from Nov 12, 2015

Conversation

quozl
Copy link
Contributor

@quozl quozl commented Nov 12, 2015

Gio.Settings changes are memory and processor expensive, because the instance persists until the change is flushed to disk.

Extra changes were happening during button creation, and for every click of a button. By default, the first button is created active by Gtk+. (See Gtk.RadioButton).

When the code tries to set another button as active, the clicked callback for the first button is triggered. When followed by apply, this can lead to incorrect setting.

Changes in this patch are to:

  • ignore callbacks for a button changing from active to inactive, by checking get_active(),
  • suppress callbacks during button creation, by connecting the toggled signal after the buttons have been created,
  • simplify the button creation code.

Fixes #4912.

Gio.Settings changes are memory and processor expensive, because the
instance persists until the change is flushed to disk.

Extra changes were happening during button creation, and for every click
of a button.  By default, the first button is created active by Gtk+.
When the code tries to set another button as active, the clicked
callback for the first button is triggered.  When followed by apply,
this can lead to incorrect setting.

Changes in this patch are to:

- ignore callbacks for a button changing from active to inactive, by
  checking get_active(),

- suppress callbacks during button creation, by connecting the toggled
  signal after the buttons have been created,

- simplify the button creation code.

Fixes #4912.
@tchx84
Copy link
Member

tchx84 commented Nov 12, 2015

Reviewed, tested, and merged.

tchx84 added a commit that referenced this pull request Nov 12, 2015
background control panel, alpha level callbacks
@tchx84 tchx84 merged commit f180ab6 into sugarlabs:master Nov 12, 2015
@quozl quozl deleted the 4912-a branch September 11, 2019 03:50
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.

None yet

2 participants