Zim

Uncheck "update heading" option on rename when heading was changed

Bug #1077400 reported by Virgil Dupras
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zim
Fix Released
Undecided
Unassigned

Bug Description

When renaming a page, there's an option called "Update the heading of this page" which is checked by default. I think that this option doesn't make sense when the heading of the page has been manually changed. Many time, I've lost my heading changes by forgetting to uncheck this option.

I would suggest that before invoking the rename dialog, we verify whether the heading of the page is the same as the page title, and only check that box of it is.

zim 0.56 on Ubuntu 12.10

Related branches

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: [Bug 1077400] [NEW] Uncheck "update heading" option on rename when heading was changed

Good suggestion, I will look into it.

-- Jaap

On Sat, Nov 10, 2012 at 6:02 PM, Virgil Dupras <email address hidden> wrote:

> Public bug reported:
>
> When renaming a page, there's an option called "Update the heading of
> this page" which is checked by default. I think that this option doesn't
> make sense when the heading of the page has been manually changed. Many
> time, I've lost my heading changes by forgetting to uncheck this option.
>
> I would suggest that before invoking the rename dialog, we verify
> whether the heading of the page is the same as the page title, and only
> check that box of it is.
>
> zim 0.56 on Ubuntu 12.10
>
> ** Affects: zim
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to Zim.
> https://bugs.launchpad.net/bugs/1077400
>
> Title:
> Uncheck "update heading" option on rename when heading was changed
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/zim/+bug/1077400/+subscriptions
>

Revision history for this message
Virgil Dupras (hsoft) wrote :

For the fun of it, I've implemented the feature (with tests) and uploaded it on a personal branch. The commit is at http://bazaar.launchpad.net/~hsoft/zim/dev/revision/604

I'm quite unfamiliar with bzr and launchpad, please let me know if I did something wrong.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: [Bug 1077400] Re: Uncheck "update heading" option on rename when heading was changed

On Sun, Nov 11, 2012 at 9:31 PM, Virgil Dupras <email address hidden> wrote:

> For the fun of it, I've implemented the feature (with tests) and
> uploaded it on a personal branch. The commit is at
> http://bazaar.launchpad.net/~hsoft/zim/dev/revision/604
>

Patch looks good to me. Maybe I would rename "should_autochange_heading()"
to something like "heading_matches_pagename()". But that is a matter of
taste. Functionality wise this looks very robust, and happy to see test
cases included :)

> I'm quite unfamiliar with bzr and launchpad, please let me know if I did
> something wrong.
>

I can merge it from your branch as is. No further action needed.

To make it "formal" you could click the button "propose for merging" in the
branch overview at https://code.launchpad.net/~hsoft/zim/dev . That would
add your branch to an overview of branches that are ready, which serves to
remind me in case I forget to merge right away :)

Regards,

Jaap

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Committed patch in rev 611

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Released in zim 0.58

Changed in zim:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.