-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
Fix crashes caused by MateImageMenuItem vs GtkImageMenuItem conflict #1434
Conversation
54d1a3f
to
d0dd5ab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was only half the problem, we also need to revert the earlier PR (rushed now and cannot find it) that first replaced GtkImageMenuItem with MateImageMenuItem.
With this, the "places" and "system" icons disappear from those menu items in the main menu at least w the compact menu
Are you sure? I asked for that here #1433 (comment) |
My results are different. I only need to revert this commit to fix the crash, which you never couldn't reproduce. |
The other commit is not the reason for the crash but rather the reason for the missing icons when used by itself. I am not going to close this now, because I think a proper technical fix keeping our replacement function is possible when used w the mate-desktop change. I will have to drill down into that, hopefully tonight. |
Pretty sure the mission icons were ONLY in the compact menu BTW |
Which missing icons? I have no idea you're talking about without a report about missing icons. |
OK, I will work on this and get it fixed right |
I just found that 675f72f was incomplete, in panel-menu-items.h we are still using |
Reopening for further development. Plan is to pack the icons into those two menuitems within the panel code instead of relying on MateImageMenuItem, as a workaround for the fact that MateImageMenuItem is declared as "final," cannot be subclassed, and thus won't work as a replacement for GtkImageMenuItem in this particular case. |
Unlike deprecated GtkImageMenuItem, MateImageMenuItem is declared as "final" and cannot be subclassed. Use GtkImageMenuItem for those two cases until a new major version bump allows fixing this in mate-desktop
This comment was marked as duplicate.
This comment was marked as duplicate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In testing, this shows the "Places" and "System" icons in the compact menu and does not crash on dragging a program icon from the compace menu to the panel. Needs a mate-panel --replace test vs 1.28.0 release on a system where that crashes
I had to copy some code from menu.c to make this work as a strictly static (local to one file) function. This and using deprecated GtkImageMenuItem are a workaround for 1.28 since we should not change library dependencies. When we move on to the 1.29 development branch we can revert this, not declare MateImageMenuItem as final in mate-desktop, and use MateImageMenuItem in these two places where it has to be subclassed but now cannot be. If others want, I can mark the places in panel-menu-items.c and the two places in panel-menu-items.h where we use GtkImageMenuItem as FIXME, and same for the two functions added to panel-menu-items.c to support this case. |
We can close this in favor of mate-desktop/mate-desktop#603 and a panel PR to replace GtkImageMenuItem with MateImageMenuItem and include libmate-desktop/mate-image-menu-item.h in mate-panel/panel-menu-items.h if we decide to allow a breaking change just after the brand-new 1.28 release, or we can keep this fix for 1.28, bump versions, and use those for 1.29 to avoid a breaking change in 1.28.0. Deeming this not my choice to make |
If we accept it mate-desktop/mate-desktop#603 We can continue to use |
As said in mate-desktop/mate-desktop#603 (comment), I don't really like how this is growing, and would rather merge mate-desktop/mate-desktop#603 and depend on it (that is, update the dependency and use the right type as the parents in the structure). |
Can be closed or not? |
Fine with closing this so long as we are OK with depending on a new mate-desktop version |
This reverts commit 675f72f.
First fix for #1433