Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#115 Bug fixes, code cleanup, build optimization

open-accepted
None
5
2013-05-27
2012-12-25
htexmexh
No

AppRun detects number of cores and runs with make -j option.
Upgraded deprecated functions to new versions.
Removed unused variables.
Made configure script respect user CFLAGS.
Fixed error in case OS did not export LIBS="-lm -ldl"
Fixed bug in gtksavebox.c that caused highlighting to stop on first period in name, not last. (strchr vs strrchr)
Fixed bug in log.c.
Defined HAVE_MMAP by default, because most systems have it.
Reconfigured toolbar order (it is annoying to close the window or go home when you meant to go up a directory), this part can be omitted if you don't like it.

Discussion

  • htexmexh
    htexmexh
    2012-12-25

    patch for rox-filer-2.11

     
    Attachments
  • Thomas Leonard
    Thomas Leonard
    2012-12-28

    How should I apply this?

    Any chance you could send it as a Git diff? e.g.

    git clone git://repo.or.cz/rox-filer.git
    cd rox-filer
    [ apply patch ]
    git commit -a
    [ enter log message ]
    git format-patch origin/master
    [ attach generated patch file ]

    (splitting it into separate patches would be even better, but I can do that myself easily enough)

    Thanks,

     
  • Thomas Leonard
    Thomas Leonard
    2012-12-28

    • assigned_to: nobody --> tal197
     
  • htexmexh
    htexmexh
    2012-12-29

    Alright, I have attached the git diff. I did not include any toolbar changes, because I don't really use the buttons I changed the order of. The configure script was not there, so I didn't modify that either.

     
  • Thomas Leonard
    Thomas Leonard
    2012-12-30

    • status: open --> open-accepted
     
  • Thomas Leonard
    Thomas Leonard
    2012-12-30

    Upgraded deprecated functions to new versions: applied, except for the g_basename stuff. Your replacement doesn't so the same thing (it allocates memory). If you want to get rid of the deprecation warning, copy the old g_basename function to support.c and make everything use that copy.

    Removed unused variables: applied

    Fixed some compiler type warnings: applied

    Parallel builds: looks like this would only work on Linux

    USE_NOTIFY: not sure what these changes are about

    LIBS="-lm -ldl": what platform is this for? Should go in the configure.in stuff if needed.

    MMAP: According to http://permalink.gmane.org/gmane.comp.desktop.rox.devel/10280:
    "Anyway, bottom line: no, I don't think xdgmime cache should be enabled."

    Commits are here:

    http://repo.or.cz/w/rox-filer.git/shortlog/4f546f6eaddb3b1283dc9e4efb3a0a2b995a9aa5

    Thanks!

     
  • htexmexh
    htexmexh
    2012-12-30

    Alright, that's good.

    You are right that g_basename and g_path_get_basename differ in that the latter allocates a new string. However, g_basename is deprecated and they say to use g_path_get_basename in new code:
    http://developer.gnome.org/glib/2.28/glib-Miscellaneous-Utility-Functions.html#g-basename
    It's your choice anyway.

    I didn't know about the xdgmime cache issue, I was wondering why it was disabled.

     
  • htexmexh
    htexmexh
    2013-05-27

    I made a mistake and I realize it only now.

    Please undo this commit:
    g_strncasecmp should be replaced by g_ascii_strncasecmp when the strings
    are ASCII.
    http://repo.or.cz/w/rox-filer.git/commit/47e00b8714d144b25184c49cb33fd0ac4e122558

    The functions g_strcasecmp and g_strncasecmp have NO replacement in Glib that I know of. I checked the implementations and they cannot be replaced by the recommended g_ascii_ versions without causing issues. I have gotten some crashes because of it, and it was fixed when I undid the changes.

    Sorry about that, I guess I should have checked the implementations more carefully. The only way deal with the deprecation when the time comes is to write local versions in support.c.