#506 mismatch by saving of the default shell

development
closed-fixed
Program (402)
5
2006-02-04
2006-01-15
joomart2
No

Debian Sarge on i386 (AMD Duron)
5.6 [Under Development] HEAD, Jan 9, 2006
With Motif: 2.1.0 [@(#)GNU/LessTif Version 2.1 Release
0.93.94]

The defined shell under "Preferences/Default Settings"
cannot saved with the dialog "Save Defaults", if there
are some shell-commands defined in nedit.rc.

I have made same tests and it seems the problem is,
that the variables from "shell" and "shellCmd" are
perhaps to similar at a specific point (or false code).
In the result of the function translatePrefFormats()
the variable TempStringPrefs.shell points to the first
shell-command of TempStringPrefs.shellCmd.

In my patch you can see my notices with "JOO".

Discussion

  • joomart2
    joomart2
    2006-01-15

    pref_shell.patch

     
    Attachments
  • Thorsten Haude
    Thorsten Haude
    2006-01-16

    • assigned_to: nobody --> yooden
     
  • Thorsten Haude
    Thorsten Haude
    2006-01-17

    Logged In: YES
    user_id=119143

    I can see the error you describe, and it can be fixed by
    something very similar to what you suggested in the third
    part of your fix. (I use an allocated string though.) Thanks!

    However, I don't quite understand the first two parts of
    your patch. I couldn't find the cause for the redefinition
    or why SetupUserMenuInfo() would cause it. Could you give me
    any pointers? What exactly are you trying to achieve with
    your workaround?

    I will look into it again on Thursday. (Hacking while
    commuting is fun.)

     
  • Thorsten Haude
    Thorsten Haude
    2006-01-17

    • status: open --> open-accepted
     
  • Thorsten Haude
    Thorsten Haude
    2006-01-17

    Logged In: YES
    user_id=119143

    Please have a look at the attached patch. I will think about
    it for a few days before commiting it.

     
  • joomart2
    joomart2
    2006-01-18

    Logged In: YES
    user_id=1419443

    Now I have tested your patch and it work fine. It seems it
    makes the right thing: it save the right shell-string.

    > However, I don't quite understand the first two parts of
    > your patch. I couldn't find the cause for the redefinition
    > or why SetupUserMenuInfo() would cause it.

    The first part of my patchfile is only a comment. In the
    second part I have tried to redefine the false value, but
    this code will delete the value of 'shellCmds'! I don't
    understand why (I have only basic know-how about C/C++).

    Thank you for this patch!

     
  • Thorsten Haude
    Thorsten Haude
    2006-01-20

    Logged In: YES
    user_id=119143

    I reworked some parts of the original fix. This makes it
    simpler to avoid this bug. Please have another look.

     
  • joomart2
    joomart2
    2006-01-20

    Logged In: YES
    user_id=1419443

    Your last patch seems perfect. It works very well. So I will
    make a new nedit debian package for me. Thanks.

     
  • Thorsten Haude
    Thorsten Haude
    2006-01-20

    Logged In: YES
    user_id=119143

    Thanks for your help!

     
  • Thorsten Haude
    Thorsten Haude
    2006-01-20

    • status: open-accepted --> pending-fixed
     
  • Logged In: YES
    user_id=1312539

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
    • status: pending-fixed --> closed-fixed