GNOME Bugzilla – Bug 685591
"Start presentation" should be disabled when there is no document
Last modified: 2013-03-03 11:46:15 UTC
- Open evince with no document.
- Switch to full screen (F11)
- Click 'Start presentation'
You get a regular evince with menu and toolbar, but in full
screen (without window decorations). It is weird because:
- It is not a presentation.
- If it were 'Full screen', then this layout should be set
when switching to full screen, not starting a presentation.
- If you open a file, you get a new window (not full screen)
on top of the weird full screen evince.
- It does not make sense to start a presentation without a
Germán, this should be as easy as enabling/disabling the action depending of whether there is a document, would you give it a try?
(In reply to comment #1)
> Germán, this should be as easy as enabling/disabling the action depending of
> whether there is a document, would you give it a try?
I have been adding the keyword gnome-love to the easy-to-fix bugs, so somebody with no experience in GNOME has something to start with in evince. I forgot to add it to this one :-)
It would be easy
When the user presses F11, we have to check whether a document is open or not.
And depending on it, we can disable the start presentation button.
If anyone could direct me to the file, I would be more willing to submit a patch.
PS I am new to Gnome development.
(In reply to comment #3)
> It would be easy
> When the user presses F11, we have to check whether a document is open or not.
> And depending on it, we can disable the start presentation button.
I think it can be checked differently. If there is no document, then, f5 should be disabled. When a document is loaded, the f5 should be enabled.
It is similar to other options like 'Properties (Alt+Return)'.
> If anyone could direct me to the file, I would be more willing to submit a
The user interface is done in the directory shell. You should take a look at ev-window.c inside that directory. In particular, you might want to check the function ev_window_setup_action_sensitivity() (see http://git.gnome.org/browse/evince/tree/shell/ev-window.c#n385).
For reference, you might want to check http://git.gnome.org/browse/evince/tree/shell/ev-window.c#n5878 as well.
You can also run evince with a debugger (gdb), or better, using a gdb front-end like nemiver or ddd.
> PS I am new to Gnome development.
Have you built evince from source code? I use https://github.com/gpoo/jhbuild to build and run the latest evince with its dependencies. Other people use different settings, it depends on what you feel comfortable.
You can also ask in evince's mailing list (https://mail.gnome.org/mailman/listinfo/evince-list) or in irc.gnome.org #evince (some time people are idle, so you might need to wait or try again later).
Created attachment 237749 [details] [review]
output of git diff
here is my try to fix this problem.
Review of attachment 237749 [details] [review]:
Thanks Lubos. It looks good to me.
Given you are using git, you might want to commit your changes locally, then run 'git format-patch HEAD^' and submit the output file here. You can see git log to get an idea of the messages written in the commit. In this case, it could be something like:
shell: disable view presentation if there is no document. Fixes #685591
Created attachment 237761 [details] [review]
patch to disable presentation view if there is no open document
Thank You for your helpful advice. I hope it will be sufficient.
Thanks! Let's wait what the maintainers say. In the meantime, you might want to work in other gnome-love bugs in evince :-)
Review of attachment 237761 [details] [review]: