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

panel-applet: ensure speaker can be shown alongside or above mic #157

Merged
merged 1 commit into from
Mar 3, 2020

Conversation

lukefromdc
Copy link
Member

Initialize the applet GktBox in the appropriate direction.

@lukefromdc
Copy link
Member Author

lukefromdc commented Feb 25, 2020

Mostly fix #154

Previously we were unconditionally packing icons into the box horizontally no matter what the panel orientation. This kicked the speaker icon out of a vertical panel in favor of the microphone icon for lack of space. Initializing the box vertical on a vertical panel causes the icons to pack vertically in that case. For a horizontal panel we keep the horizontal orientation.

Note that trying to use gtk_orientable_set_orientation to reset the box orientation after it has already been set up did not work, possibly because icons had ever already been packed into the box.

Doing this at initialization works, but if the applet is dragged from a vertical panel to a horizontal one or vice-versa the panel must be restarted or the applet removed and added back to get both icons to show up. Same if the whole (previously set up) panel is changed from horizontal to vertical or vice-versa.

We also have another orientation change issue with this applet, the cpufreq applet, and the sensors applet: they are not updating their backgrounds when the panel is changed from horizontal to vertical or vice-versa.

@lukefromdc lukefromdc force-pushed the fix-vertical-panel-applet branch from f20018f to b4e762e Compare February 25, 2020 06:06
Initialize the applet GktBox in the appropriate direction.
@lukefromdc
Copy link
Member Author

Travis caught an error where the change pushed did not match the change to the file built, due to an accidental change just before copying from the build directory back to the git repo directory(in which I never build).

Copy link
Member

@raveit65 raveit65 left a comment

Choose a reason for hiding this comment

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

I can confirm that this fixes the problem,
tested with fedora. Of course a panel restart is needed after the applet was moved from another panel.
I don't think that this happens very often.

@raveit65 raveit65 requested a review from a team February 26, 2020 18:00
@lukefromdc
Copy link
Member Author

Merging as we have a huge number of open PR's right now and reviewers are overwhelmed so another review might not be likely

@lukefromdc lukefromdc merged commit 37b3581 into master Mar 3, 2020
@lukefromdc lukefromdc deleted the fix-vertical-panel-applet branch March 3, 2020 19:59
@cmadamsgit
Copy link

I'm a little late (was travelling and didn't catch up), but I can also confirm this works on Fedora 31, as applied to the mate-media-1.22.2 SRPM. Thanks for the quick fix!

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.

3 participants