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 443851 - Wakes up too often
Wakes up too often
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-06-04 09:13 UTC by Bastien Nocera
Modified: 2007-06-05 14:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
evince-timeout.patch (1.65 KB, patch)
2007-06-04 09:14 UTC, Bastien Nocera
committed Details | Review
evince-timeout-trunk.patch (2.20 KB, patch)
2007-06-05 09:25 UTC, Bastien Nocera
committed Details | Review
evince-simplify-timeout.patch (1.85 KB, patch)
2007-06-05 13:26 UTC, Bastien Nocera
accepted-commit_now Details | Review

Description Bastien Nocera 2007-06-04 09:13:46 UTC
From:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=242397

---8<---
evince wakes every 2 seconds up to see if ->modified is set, and if so, it saves
the config file. ->modified gets only set in 2 places; and rarely so in practice.

The patch attached just arms the timer only when things actually get modified,
and the timer then only runs 1 time.
---8<---
Comment 1 Bastien Nocera 2007-06-04 09:14:20 UTC
Created attachment 89315 [details] [review]
evince-timeout.patch

Patch from Arjan van de Ven (arjan@linux.intel.com)
Comment 2 Nickolay V. Shmyrev 2007-06-04 20:37:37 UTC
Great, thanks a lot, can you please commit it. Also it would be nice to keep it in sync with gedit.
Comment 3 Bastien Nocera 2007-06-05 08:59:14 UTC
Shall I commit just to trunk, or to gnome-2-18 as well?
Comment 4 Nickolay V. Shmyrev 2007-06-05 09:00:55 UTC
As you like
Comment 5 Bastien Nocera 2007-06-05 09:25:31 UTC
Created attachment 89397 [details] [review]
evince-timeout-trunk.patch

Patch as committed to trunk
Comment 6 Bastien Nocera 2007-06-05 09:26:05 UTC
Committed to trunk and gnome-2-18.

2007-06-05  Bastien Nocera  <hadess@hadess.net>

        * shell/ev-metadata-manager.c: (ev_metadata_arm_timeout),
        (ev_metadata_manager_init), (ev_metadata_manager_shutdown),
        (ev_metadata_manager_set_last), (ev_metadata_manager_set),
        (ev_metadata_manager_save): Adapted patch from Arjan van de
        Ven (arjan@linux.intel.com) to avoid the timeout running all the
        time, saves on power (Closes: #443851)
Comment 7 Bastien Nocera 2007-06-05 13:26:38 UTC
Created attachment 89408 [details] [review]
evince-simplify-timeout.patch

To commit on trunk, a simplified version as pointed out by Paolo Maggi in http://bugzilla.gnome.org/show_bug.cgi?id=444270#c4
Comment 8 Nickolay V. Shmyrev 2007-06-05 13:35:56 UTC
Just commit it without questions, thanks a lot.
Comment 9 Bastien Nocera 2007-06-05 14:05:35 UTC
2007-06-05  Bastien Nocera  <hadess@hadess.net>

        * shell/ev-metadata-manager.c: (ev_metadata_manager_init),
        (ev_metadata_manager_shutdown), (ev_metadata_manager_set_last),
        (ev_metadata_manager_set), (ev_metadata_manager_save):
        Simplify the timeout, no need for modified anymore