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 685591 - "Start presentation" should be disabled when there is no document
"Start presentation" should be disabled when there is no document
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-10-06 00:02 UTC by Germán Poo-Caamaño
Modified: 2013-03-03 11:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
output of git diff (661 bytes, patch)
2013-03-01 21:52 UTC, Lubos Koudelka
reviewed Details | Review
patch to disable presentation view if there is no open document (979 bytes, patch)
2013-03-01 22:44 UTC, Lubos Koudelka
committed Details | Review

Description Germán Poo-Caamaño 2012-10-06 00:02:54 UTC
Situation:

- 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
  document.
Comment 1 José Aliste 2013-02-09 11:47:52 UTC
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?
Comment 2 Germán Poo-Caamaño 2013-02-10 07:29:10 UTC
(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 :-)
Comment 3 punitkoura099 2013-02-20 17:50:04 UTC
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.
Comment 4 Germán Poo-Caamaño 2013-02-20 21:07:48 UTC
(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
> patch.

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).
Comment 5 Lubos Koudelka 2013-03-01 21:52:57 UTC
Created attachment 237749 [details] [review]
output of git diff
Comment 6 Lubos Koudelka 2013-03-01 21:53:51 UTC
hi,
here is my try to fix this problem.
Comment 7 Germán Poo-Caamaño 2013-03-01 22:14:13 UTC
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
Comment 8 Lubos Koudelka 2013-03-01 22:44:05 UTC
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.
Comment 9 Germán Poo-Caamaño 2013-03-02 01:44:21 UTC
Thanks! Let's wait what the maintainers say.  In the meantime, you might want to work in other gnome-love bugs in evince :-)
Comment 10 Carlos Garcia Campos 2013-03-03 11:46:01 UTC
Review of attachment 237761 [details] [review]:

Thanks!