Skip to content

Feature Request: Add case sensitive option #151

@slackuser0xae34

Description

@slackuser0xae34

Please add a case sensitive option for file/tree listings, when convenient. Some of us compare file listings between Qtfm and Bash shell (which is case sensitive).

I've coded a preliminary patch that allows the qtfm6.conf file to provide for case sensitive file listings. The config file would need a line: "caseSensitive=true" to enable case sensitive listings. The line must be manually added to the qtfm6.conf file. If the line is either missing or something other than "true" then the current default action is used.

I've tested this with file listing but not the tree listing option. I only use the file listing display.
Thanks for a great file manager and the consideration of my request.

Best Regards, slackuser0xae34

Edit, 2020/02/25: Sorry I forgot, I license the following code under the GPL V2 (or later at the user's discretion).

 # Patch to add case sensitive:
 diff -Naur qtfm-6.2.0a/fm/src/mainwindow.cpp qtfm-6.2.0b/fm/src/mainwindow.cpp
 --- qtfm-6.2.0a/fm/src/mainwindow.cpp	2019-06-04 01:47:00.000000000 -0400
 +++ qtfm-6.2.0b/fm/src/mainwindow.cpp	2019-08-12 21:17:02.833464614 -0400
 @@ -529,6 +529,14 @@
    // 'copy of' filename
    copyXof = settings->value("copyXof", COPY_X_OF).toString();
    copyXofTS = settings->value("copyXofTS", COPY_X_TS).toString();
 +
 +  // Case Sensitive/Insensitive, 2019/08/12
 +  caseSensitive = settings->value("caseSensitive", false).toBool();
 +  if ( caseSensitive ) {
 +    modelTree->setSortCaseSensitivity(Qt::CaseSensitive);
 +    modelView->setSortCaseSensitivity(Qt::CaseSensitive);
 +  }	
 +
  }

  void MainWindow::firstRunBookmarks(bool isFirstRun)
 diff -Naur qtfm-6.2.0a/fm/src/mainwindow.h qtfm-6.2.0b/fm/src/mainwindow.h
 --- qtfm-6.2.0a/fm/src/mainwindow.h	2019-06-04 01:47:00.000000000 -0400
 +++ qtfm-6.2.0b/fm/src/mainwindow.h	2019-08-12 21:17:02.833464614 -0400
 @@ -329,6 +329,8 @@
      // custom timestamp for copy of
      QString copyXofTS;

 +    bool caseSensitive;
 +
      bool ignoreReload;

      QVector<QString> progressQueue;

 # End Patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions