After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 794749 - Use ev_window_set_action_enabled when possible
Use ev_window_set_action_enabled when possible
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-03-28 03:25 UTC by José Aliste
Modified: 2018-03-29 01:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
shell: Use ev_window_set_action_enabled more (4.87 KB, patch)
2018-03-28 03:25 UTC, José Aliste
committed Details | Review

Description José Aliste 2018-03-28 03:25:14 UTC
Currently there are plenty uses of the same pattern... Grab a simple action from the EvWindow Action group by name and then enable/disable it with g_simple_action_set_enabled. This pattern is already coded into ev_window_set_enabled and used in some parts of ev-window.c but not in all... So we should fix this and use ev_window_set_enabled in all situations when all we do is to enable/disable the action.
Comment 1 José Aliste 2018-03-28 03:25:44 UTC
Created attachment 370226 [details] [review]
shell: Use ev_window_set_action_enabled more

There were many uses of the same pattern that is already
coded in ev_window_set_action_enabled, so use it in all cases
all you need to do is enable/disable the action.
Comment 2 José Aliste 2018-03-28 03:27:14 UTC
German, Carlos, could you review this to make sure I am not mistaken... I could not figure out a reason why we have mixed code, so I changed everything.
Comment 3 Germán Poo-Caamaño 2018-03-28 11:46:25 UTC
Review of attachment 370226 [details] [review]:

It looks got to me
Comment 4 José Aliste 2018-03-29 01:21:48 UTC
Review of attachment 370226 [details] [review]:

thanks
Comment 5 José Aliste 2018-03-29 01:22:14 UTC
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.