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

Window properties forces titlebar buttons layout to "Left" if "Right (with menu)" is not selected in MATE Tweaks #640

Closed
ahayzen opened this issue Mar 27, 2021 · 2 comments · Fixed by #642

Comments

@ahayzen
Copy link

ahayzen commented Mar 27, 2021

Expected behaviour

When opening mate-window-properties for the titlebar buttons to not change.

Actual behaviour

When opening mate-window-properties if you have "Right" or "Left (with menu)" selected in MATE Tweak, it will override this setting and force the user to use "Left".

Steps to reproduce the behaviour

  1. Open MATE Tweak, set the window control placement to "Right" or "Left (with menu)"
  2. Open mate-window-properties
  3. Observe that if you had selected "Right" you now have "Left" controls, and if you had selected "Left (with menu)" you now have just "Left"

This is due to

#define MARCO_BUTTON_LAYOUT_RIGHT "menu:minimize,maximize,close"
which defines the following

#define MARCO_BUTTON_LAYOUT_RIGHT "menu:minimize,maximize,close"
#define MARCO_BUTTON_LAYOUT_LEFT "close,minimize,maximize:"

These effectively map to "Right (with menu)" and "Left" in MATE Tweak.

At startup mate-window-properties checks if the user has picked "Right (with menu)", if the user hasn't, then it forces the user to the layout "Left". Instead of respecting their decision of "Right" or "Left (with menu)".

g_strcmp0 (str, MARCO_BUTTON_LAYOUT_RIGHT) == 0 ? 0 : 1);

    str = g_settings_get_string (marco_settings, MARCO_BUTTON_LAYOUT_KEY);
    gtk_combo_box_set_active (GTK_COMBO_BOX (titlebar_layout_optionmenu),
                              g_strcmp0 (str, MARCO_BUTTON_LAYOUT_RIGHT) == 0 ? 0 : 1);
    g_free (str);

Either mate-window-properties should have the two extra menu items of MATE Tweak, so that it can map all four. Or it should perform a more intelligent check that counts the controls on either side of the : in the settings.

MATE general version

1.24.1 (not sure where to get this info from ?)

Package version

$ apt policy mate-tweak mate-control-center
mate-tweak:
Installed: 21.04.3-0ubuntu1
Candidate: 21.04.3-0ubuntu1
Version table:
*** 21.04.3-0ubuntu1 500
500 http://archive.ubuntu.com/ubuntu hirsute/universe amd64 Packages
100 /var/lib/dpkg/status
mate-control-center:
Installed: 1.24.1-1
Candidate: 1.24.2-0ubuntu1
Version table:
1.24.2-0ubuntu1 500
500 http://archive.ubuntu.com/ubuntu hirsute/universe amd64 Packages
*** 1.24.1-1 100
100 /var/lib/dpkg/status

Linux Distribution

Ubuntu MATE Hirsute 21.04 daily build

Link to bugreport of your Distribution (requirement)

https://bugs.launchpad.net/ubuntu/+source/mate-control-center/+bug/1906535

@raveit65
Copy link
Member

Sorry, mate-tweak is a ubuntu-mate production.
We can't help you here....
You have to wait for response from ubuntu maintainer
@flexiondotorg ^^^^

@ahayzen
Copy link
Author

ahayzen commented Mar 27, 2021

Thanks for the response, I understand that you do not support mate-tweak.

However also note that if the user has chosen a custom value for button-layout such as :close by any means, if the user opens mate-window-properties instead of the tool respecting the users choice, if it doesn't understand the choice (eg if the value is not menu:minimize,maximize,close) then it just forces the value to close,minimize,maximize:. Rather than for example stating that the value is "custom" or "other" or leaving it blank until the user actively switches it to one of the predefined presets. It seems like there is an opportunity in this code to be more intelligent and respect any user changes.

Or even just throw up a warning that the setting has been reset - as I as a user didn't notice that my settings had been changed until I noticed buttons were in different places, if a dialog had been shown saying the setting is non-standard/supported and is being reset, then at least i would know.

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 a pull request may close this issue.

2 participants