Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Added a new plugin, RSort. Sorts in decending order. #505

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MBertrand5470
Copy link

  • This new RSort plugin does the reverse sort of the Sort plugin.
  • Use CTRL-F10 shortcut to run the plugin.
  • Modified po files for this new plugin.
  • Note: only English and French files were completed, for other
    languages, only the translation squeleton was added.

- This new RSort plugin does the reverse sort of the Sort plugin.
- Use CTRL-F10 shortcut to run the plugin.
- Modified po files for this new plugin.
- Note: only English and French files were completed, for other
      languages, only the translation squeleton was added.
@MBertrand5470
Copy link
Author

Fixes issue #501 .
Pull request #503 was cancelled, this new one adds plugin RSort.

@clefebvre clefebvre changed the title Added a new plugin, RSort. Sorts in decending order. [Next] Added a new plugin, RSort. Sorts in decending order. Dec 16, 2021
@clefebvre clefebvre changed the title [Next] Added a new plugin, RSort. Sorts in decending order. Added a new plugin, RSort. Sorts in decending order. Jan 17, 2022
@mtwebster
Copy link
Member

Hi,

While I appreciate the effort here, it's not necessary for this to be a new plugin - it can just be added to the existing sort plugin.

You simply add your action entry to the array in the other plugin:

static const GtkActionEntry action_entries[] =
{
    { "Sort",
      NULL,
      N_("S_ort lines"),
      "F10",
      N_("Sort the current document or selection"),
      G_CALLBACK (sort_cb)
    },
    { "RSort",
    ...
    ...
    ...
    }
};

and then add your rsort_cb() function. Then do whatever you need to reverse the sort depending on the action (this may be as simple as altering the behavior of compare_line, not sure).

Please don't include changes to the .po files, we handle that on launchpad.

@clefebvre clefebvre changed the title Added a new plugin, RSort. Sorts in decending order. [WIP] Added a new plugin, RSort. Sorts in decending order. Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants